Skip to main contentdfsdf

Home/ longdaboggperp's Library/ Notes/ Facebook Link Open In App Android

Facebook Link Open In App Android

from web site

=


Facebook Link Open In App Android

Download

Facebook Link Open In App Android

We are working to restore service. See: facebook.com/help/217671661585622 [Title: How are Pages different from personal profiles?] –Murmel Mar 13 '15 at 8:28 for notes: intent = new Intent(Intent.ACTIONVIEW, Uri.parse("fb://note/" + facebookNoteId)); –voodoo98 Mar 14 '15 at 11:48 To find Id for public page, event, profile you can use FindMyFbId –Carlos Zerga Jan 27 '17 at 16:16 Profile is not opening up in Facebook App. Otherwise, it will open Facebook in the browser. Open the browser Uri uri = Uri.parse(facebookUrl); startActivity(new Intent(Intent.ACTIONVIEW, uri)); } } catch (PackageManager.NameNotFoundException e) { // Facebook is not installed. * * Example usage: * * {code newFacebookIntent(ctx.getPackageManager(), " * * param pm * The {link PackageManager}. (Similar to other answers in terms for facts. */ public static Intent newFacebookIntent(PackageManager pm, String url) { Uri uri = Uri.parse(url); try { ApplicationInfo applicationInfo = pm.getApplicationInfo("com.facebook.katana", 0); if (applicationInfo.enabled) { // uri = Uri.parse("fb://facewebmodal/f?href=" + url); } } catch (PackageManager.NameNotFoundException ignored) { } return new Intent(Intent.ACTIONVIEW, uri); } shareimprove this answer edited Oct 30 '15 at 17:47 answered Jul 3 '14 at 7:21 Jared Rummler 25.2k1286107 you solved my the whole despair. Then start an intent as follows: Intent facebookIntent = new Intent(Intent.ACTIONVIEW); String facebookUrl = getFacebookPageURL(this); facebookIntent.setData(Uri.parse(facebookUrl)); startActivity(facebookIntent); shareimprove this answer answered Oct 25 '17 at 12:16 Bilal Ahmad 293 add a comment up vote 2 down vote Intent intent = null; try { getPackageManager().getPackageInfo("com.facebook.katana", 0); String url = " intent = new Intent(Intent.ACTIONVIEW, Uri.parse("fb://facewebmodal/f?href="+url)); } catch (Exception e) { // no Facebook app, revert to browser String url = " intent = new Intent(Intent.ACTIONVIEW); intent .setData(Uri.parse(url)); } this.startActivity(intent); shareimprove this answer answered Dec 15 '16 at 2:14 Tiger developer 13017 add a comment up vote 2 down vote Best answer I have found, it's working great. Get your id (the large number) from shareimprove this answer edited Jan 8 '14 at 14:31 Bjrn Marschollek 6,71583357 answered Jun 24 '13 at 23:04 John 7271021 I agree, this is better because it does not make any assumptions about the Facebook app package name or intent filters. String facebookId = "fb://page/ "; String urlPage = " try { startActivity(new Intent(Intent.ACTIONVIEW, Uri.parse(facebookId ))); } catch (Exception e) { Log.e(TAG, "Application not intalled."); //Open url web page. You can find this class through {link * Context#getPackageManager()}. On Facebook version 13.0.0.13.14 –Jared Rummler Jul 23 '14 at 21:18 4 it did not work for me –angel Mar 10 '16 at 17:53 show 17 more comments up vote 33 down vote Is this not easier? For example within an onClickListener? try { Intent intent = new Intent(Intent.ACTIONVIEW, Uri.parse("fb://profile/426253597411506")); startActivity(intent); } catch(Exception e) { startActivity(new Intent(Intent.ACTIONVIEW, Uri.parse(" } PS. Posting it here just to simplify and make the implementation reusable) "fb://page/ does not work with newer versions of the FB app. ClubDeadspinEartherGizmodoJalopnikJezebelKotakuLifehackerSplinterThe TakeoutThe RootThe Onion. rev2018.1.9.28317 . This is a functionality we generally use in most of our apps. asked 6 years, 11 months ago viewed 246,059 times active 2 months ago Blog Take the 2018 Developer Survey Linked 7 URL to open facebook app in android 7 Android - Facebook Intent to visit a certain Facebook page? 0 Open facebook page in App not the browser 0 open Facebook with Intent and url facebook 20 Open Facebook Page in Facebook App (if installed) on Android 16 Opening facebook app on specified profile page 21 Open Google Plus Page Via Intent In Android 10 Open facebook page from android app (in facebook version > v11) 10 how to open Facebook app from url only if installed 2 Cannot see like option in facebook page from android device see more linked questions Related 2805Close/hide the Android Soft Keyboard2936Why is the Android emulator so slow? How can we speed up the Android emulator?2132Is there a unique Android device ID?355Design for Facebook authentication in an iOS app that also accesses a secured web service687Android error: Failed to install *.apk on device *: timeout55Open a facebook link by native Facebook app on iOS2924Proper use cases for Android UserManager.isUserAGoat()?61Open link to Facebook page from iOS app14How to detect if Facebook app is installed on iOS?1493How does Facebook disable the browser's integrated Developer Tools? Hot Network Questions Protection of shell command with string variable Changing default paper size for TeX Live Why Google Translate translate back not same as the first time translate? fixing the following diagram? Should a value of a constant be changed over time? Complete Disaster Under what conditions would humanoids evolve eyes in the backs of their heads? Why play a fretted note while you can play it on an open string? Does a 2100W angle grinder need an earth pin? Is a verbal response that directly expresses anger always the wrong choice? How did people use ed? Could you strap shotguns to the back of a centaur to be fired during a charge? 4-terminal shunt resistor The use of T[] as a template parameter How do I get other players to ask about my backstory? Hugely important database replete with errors Why is it so inefficient to generate electricity by absorbing heat? How should a student's inefficient calculation be pointed out? Can I drive Elon Musk's Tesla in 100 Years? What sense does it make for "sharpness" to be adjustable on a monitor? Tournaments with exactly one directed Hamiltonian path What is the meaning of this small symbol on my mod card? Is evolutionary "morality" really the same thing as human morality? Why was Harry Truman chosen to be Vice President in 1944? more hot questions question feed default . Then start an intent as follows: Intent facebookIntent = new Intent(Intent.ACTIONVIEW); String facebookUrl = getFacebookPageURL(this); facebookIntent.setData(Uri.parse(facebookUrl)); startActivity(facebookIntent); That's all you need. shareimprove this answer edited Mar 9 '16 at 16:17 Daniele Segato 7,07433554 answered Apr 18 '12 at 15:59 joaomgcd 3,43821932 1 Thanks for this, helped me out greatly! Now if only there was a way to do it for twitter –Evan R. (Like mentioned in another answer here) This is a full fledged working code currently live in one of my apps: public static String FACEBOOKURL = " public static String FACEBOOKPAGEID = "YourPageName"; //method to get the right URL to use in the intent public String getFacebookPageURL(Context context) { PackageManager packageManager = context.getPackageManager(); try { int versionCode = packageManager.getPackageInfo("com.facebook.katana", 0).versionCode; if (versionCode >= 3002850) { //newer versions of fb app return "fb://facewebmodal/f?href=" + FACEBOOKURL; } else { //older versions of fb app return "fb://page/" + FACEBOOKPAGEID; } } catch (PackageManager.NameNotFoundException e) { return FACEBOOKURL; //normal web url } } This method will return the correct url for app if installed or web url if app is not installed. when I am setting link "facebook.com/pages/"+pageid" –BSKANIA Mar 7 '14 at 7:38 Omit the 'pages/'-part ->use "facebook.com/" +pageId –Murmel Feb 19 '15 at 13:50 add a comment up vote 20 down vote Here's the way to do it in 2016, works great, and is very easy. if your URL is you should put EXAMPLEPAGE at the end of this URL, after the ? String YourPageURL = " Intent browserIntent = new Intent(Intent.ACTIONVIEW, Uri.parse(YourPageURL)); startActivity(browserIntent); shareimprove this answer edited May 16 '16 at 20:59 answered May 14 '16 at 21:40 Someguy123 864821 1 this should become the accepted answer in 2016 –grAPPfruit Jun 20 '16 at 14:11 1 Works perfectly, even in 2016. Open the browser Uri uri = Uri.parse(facebookUrl); startActivity(new Intent(Intent.ACTIONVIEW, uri)); } } shareimprove this answer answered Sep 15 '15 at 7:12 Javier Amor Penas 715 add a comment up vote 3 down vote "fb://page/ does not work with newer versions of the FB app. Instead of: context.getPackageManager().getPackageInfo("com.facebook.katana", 0); return new Intent(Intent.ACTIONVIEW, Uri.parse("fb://profile/620681997952698")); You can use the following to decide what to do: PackageInfo info = context.getPackageManager().getPackageInfo("com.facebook.katana", 0); if(info.applicationInfo.enabled) return new Intent(Intent.ACTIONVIEW, Uri.parse("fb://profile/620681997952698")); else return new Intent(Intent.ACTIONVIEW, Uri.parse(" shareimprove this answer answered Feb 18 '14 at 16:53 igordcard 1,2351320 add a comment up vote 3 down vote After much testing I have found one of the most effective solutions: private void openFacebookApp() { String facebookUrl = "www.facebook.com/XXXXXXXXXX"; String facebookID = "XXXXXXXXX"; try { int versionCode = getActivity().getApplicationContext().getPackageManager().getPackageInfo("com.facebook.katana", 0).versionCode; if(!facebookID.isEmpty()) { // open the Facebook app using facebookID (fb://profile/facebookID or fb://page/facebookID) Uri uri = Uri.parse("fb://page/" + facebookID); startActivity(new Intent(Intent.ACTIONVIEW, uri)); } else if (versionCode >= 3002850 && !facebookUrl.isEmpty()) { // open Facebook app using facebook url Uri uri = Uri.parse("fb://facewebmodal/f?href=" + facebookUrl); startActivity(new Intent(Intent.ACTIONVIEW, uri)); } else { // Facebook is not installed. Just go to your page on Facebook in the browser, right click, and click on "View source code", then find the pageid attribute: you have to use pageid here in this line after the last back-slash: fb://page/pageID For example: Intent facebookAppIntent; try { facebookAppIntent = new Intent(Intent.ACTIONVIEW, Uri.parse("fb://page/1883727135173361")); startActivity(facebookAppIntent); } catch (ActivityNotFoundException e) { facebookAppIntent = new Intent(Intent.ACTIONVIEW, Uri.parse(" startActivity(facebookAppIntent); } shareimprove this answer edited Mar 27 '17 at 15:53 Fabio Turati 2,22851829 answered Mar 27 '17 at 15:16 Shahid 314 This only make sense for static apps. –Jared Rummler Jul 3 '14 at 19:32 1 DjHacktorReborn Just checked, working here. * return An intent that will open the Facebook page/profile. Otherwise, launch // a browser final PackageManager packageManager = getPackageManager(); List list = packageManager.queryIntentActivities(intent, PackageManager.MATCHDEFAULTONLY); if (list.size() == 0) { final String urlBrowser = " intent.setData(Uri.parse(urlBrowser)); } startActivity(intent); } shareimprove this answer answered May 21 '13 at 16:57 MBH 5,53885498 this is not working. Not the answer you're looking for? Browse other questions tagged android facebook url-scheme or ask your own question. –doubotis Jul 1 '16 at 8:17 2 When I use this, the header of the Facebook page I'm referencing is missing in the Facebook app, e.g. –Vaiden Apr 21 '13 at 11:46 add a comment up vote 7 down vote try this code: String facebookUrl = " "; try { int versionCode = getPackageManager().getPackageInfo("com.facebook.katana", 0).versionCode; if (versionCode >= 3002850) { Uri uri = Uri.parse("fb://facewebmodal/f?href=" + facebookUrl); startActivity(new Intent(Intent.ACTIONVIEW, uri)); } else { Uri uri = Uri.parse("fb://page/ "); startActivity(new Intent(Intent.ACTIONVIEW, uri)); } } catch (PackageManager.NameNotFoundException e) { startActivity(new Intent(Intent.ACTIONVIEW, Uri.parse(facebookUrl))); } shareimprove this answer answered Jan 23 '15 at 7:44 Ravi Makvana 1,8931426 add a comment up vote 4 down vote My answer builds on top of the widely-accepted answer from joaomgcd. I discovered this after looking into how emails send by facebook opened the app. the page profile image and the Page / Activity / Insights tabs. It depends what you want. The A.V. The intent for the Twitter app will be selected but it will not be able to process it as it is disabled. more stack exchange communities company blog Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Log In Sign Up . Email Sign Up or sign in with Google Facebook Open Facebook page from Android app? Ask Question up vote 132 down vote favorite 73 from my Android app, I would like to open a link to a Facebook profile in the official Facebook app (if the app is installed, of course) 5a02188284

who are the 6 friends that appear on your facebook profile
what does c stand for on facebook
facebook negative effects on education
indian flag code for facebook
facebook app lg t500
aplikasi facebook chat nokia 6600
pirates facebook hack v 1.2 telecharger gratuit
facebook.webcontrols.dll free download
show me how to hack facebook accounts
wer wird in facebook chatleiste angezeigt

longdaboggperp

Saved by longdaboggperp

on Jan 09, 18