Skip to content

Instantly share code, notes, and snippets.

Created January 10, 2018 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/0770ad02d5742e362710ca673e55637c to your computer and use it in GitHub Desktop.
Save anonymous/0770ad02d5742e362710ca673e55637c to your computer and use it in GitHub Desktop.
Facebook Link To Native App
********************
Facebook Link To Native App >>>
********************
http://shurll.com/c0pa2
(Copy & Paste link)
********************
One trend from many of these features is that Facebook is paring down the connection between its site and the web at large as many of these products sought to enrich outside experience and may only be detracting from core experiences buried inside Facebook at this moment. 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 . I was not trying to discredit your 2014 answer. Terms of Use Privacy Policy Communications Preferences . Any idea why this is? –c0d3Junk13 Oct 16 '14 at 23:53 1 We need to add whitelist in Info.plist in iOS 9 too to make it works. However, its not possible to navigate to anywhere else in the Facebook app) fb://feed Open Facebook app to the News Feed fb://events Open Facebook app to the Events page fb://requests Open Facebook app to the Requests list fb://notes - Open Facebook app to the Notes page fb://albums Open Facebook app to Photo Albums list To launch the above URLs: NSURL *theURL = [NSURL URLWithString:"fb:// "]; [[UIApplication sharedApplication] openURL:theURL]; shareimprove this answer edited Mar 7 '13 at 0:32 typeoneerror 30.5k28111191 answered May 2 '12 at 15:04 Saad 7,44722846 Is it possible to check in Simulator 6.1 ? –Chintan Jul 31 '13 at 12:29 You can't add any application on simulator. That is the obj-c code of the monotouch code I had originally posted. 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 . NSString *myUrls = "fb://profile/100000369031300 NSArray *urls = [myUrls componentsSeparatedByString:""]; for (NSString *url in urls){ NSURL *nsurl = [NSURL URLWithString:url]; if ([[UIApplication sharedApplication] canOpenURL:nsurl]){ [[UIApplication sharedApplication] openURL:nsurl]; break; } } The break is not always called before your app changes to Safari/Facebook. Jump toSections of this pageAccessibility HelpPress alt + / to open this menuRemoveTo help personalize content, tailor and measure ads, and provide a safer experience, we use cookies. So if you use the officially documented way to open this dialog you would get this functionality with no further changes as soon as it becomes available. shareimprove this answer edited Jul 3 '13 at 4:07 Communityf 11 answered Nov 14 '12 at 1:42 Brad Moore 220421 Cheers for that edit. Hybrid webapps can be more or less clones of a website but get access to native Apps. Consequently the web share dialog prompts them to input their user credentials - which might lead them to not share after all. I used this inside a class which had changing URLs at times which is why I just didn't put it in a if/elseif statement. Hope it helps someone!. –Novaterata Oct 5 '14 at 0:04 Walker did you find any working solution for this ? –Satyen Udeshi Jul 12 '16 at 7:07 Hi as it's answer is from 2014 but in 2017 is there any things to make it possible to open native app from web to share something? –Vishal Thoriya Mar 8 '17 at 11:54 I am facing same issue and couldn't find anything around it :( –Rajat Chandak Dec 26 '17 at 10:38 add a comment 2 Answers 2 active oldest votes up vote 23 down vote +250 As of now, there is no official way to achieve this. The easiest way to use the official web share dialog, without any prerequisites, is to link to this URL: appid=145634995501895 &display=popup &href=URLTOSHARE &redirecturi=RETURNURL where you replace URLTOSHARE and RETURNURL with the proper URL-encoded values. Thanks in advance for the help! android ios facebook mobile shareimprove this question edited Oct 11 '14 at 21:22 Patrick Hofman 108k15131176 asked Sep 29 '14 at 18:27 Walker 29.1k185285 3 Are you talking about when you click a share button in a web page on a mobile device? I think that is always done with the Facebook JavaScript SDK which doesn't use the App. Not the answer you're looking for? Browse other questions tagged android ios facebook mobile or ask your own question. rev2018.1.10.28325 . Its asking again to Login. How to format a number with space to the thousands What is going on grammatically in the opening line of One Hundred Years of Solitude? Can you use Ready an action with "receive a buff from an ally" as the trigger? Under what conditions would humanoids evolve eyes in the backs of their heads? What's underused by Americans? Write Moby Dick, approximately How do I negotiate more "Man" time for myself without offending my partner? Difference between 0-18V and -9V - +9V How to repeat automatically seamless pattern in Photoshop? How to keep democracies from falling behind technologically? Only Three Books: Restarting Chemistry after civilization collapses Thermochemistry - zero heat energy Why don't ICs include bypass capacitors? What are good examples that actually motivate the study of recursion? How to partially extract zipped huge plain text file? Why is ReLU used as an activation function? Obtain the values of a function which are greater than 1 What kind of approval does Donald Trump need to build his wall? How is the cruise speed of an aircraft chosen? Does AWS offer a way to route HTTPS traffic to two different EC2 instances based on directory path? Can you share some screenshots of editor's control panels? Why is Windows reporting a battery charge with my desktop? Reasons to buy house in cash more hot questions question feed default . These features, which also include the Native Like Button, App Links Host, Comment Mirroring, Send Button, Sharing Insights and Follow Button products, are going to be shut down February 6 in order for [Facebook] to build new products for [their] developer community. All rights reserved. However, its not possible to navigate to anywhere else in the Facebook app) fb://feed Open Facebook app to the News Feed fb://events Open Facebook app to the Events page fb://requests Open Facebook app to the Requests list fb://notes Open Facebook app to the Notes page fb://albums Open Facebook app to Photo Albums list If before opening this url you want to check wether the user fas the facebook app you can do the following (as explained in another answer below): if ([[UIApplication sharedApplication] canOpenURL:nsurl]){ [[UIApplication sharedApplication] openURL:nsurl]; } else { //Open the url as usual } Source shareimprove this answer edited Feb 17 '14 at 11:36 Miquel Coll 473627 answered May 2 '12 at 15:02 WrightsCS 44.2k21121168 can i open this url in safari with login?. See sharing from iOS or android. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count). Just for completeness: In native apps on iOS and Android it is possible to link to the Facebook app directly if the user has the Facebook app installed. It allowed Facebook comments to appear on pieces of content offsite that used the plug-in; now those comments will only live on the big FB itself. As this is not always the case you have to check using the respective platform's specific Facebook SDK and fallback to the web-based dialog as well. With Facebooks 4.28 SDK version, App Invites are done and there doesnt seem to immediately be another replacement coming for developers who relied on the tool.Comment mirroring is another feature getting the boot, if you had it enabled. Even if you check for all these cases, Facebook has already changed their URL-Schemes and might do so again at any time, breaking your link(s) or - maybe worse - leading to undefined behavior. Stack Overflow works best with JavaScript enabled .. Menu Search Follow Us Facebook Instagram Twitter Youtube Flipboard LinkedIn Google+ RSS More Youtube Flipboard LinkedIn Google+ RSS Got a tip? Let us know. Email Sign Up or sign in with Google Facebook Open a facebook link by native Facebook app on iOS Ask Question up vote 55 down vote favorite 34 If the native Facebook app is installed on the iPhone. –jan.vogt May 30 '17 at 17:36 Endran Do you mean sharing from a native app? Because the OP's question is not about that. It's 5 lines in Android, how come this is so difficult on iOS? –Endran May 21 '17 at 13:04 VishalThoriya True, this answer is three years old 5a02188284
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment