12

I am looking to let a reader of my site share the url from a mobile browser to their native facebook app without using javascript, or having them login through the cumbersome web process.

In the past, this was accomplished using the fb://publish/profile/me?text=blah url scheme for both iOS and Android. When clicked, this link would open the native app and start a new share dialog.

Sometime in late 2013/early 2014 though, this method stopped working. Is there a more current way to use a static URL to open up a native share dialog on iOS and/or an Android Intent? A canonical answer is needed here as searching SO leads to a ton of old, deprecated dead ends.

coneybeare
  • 33,113
  • 21
  • 131
  • 183
  • Facing the exact same problem mate! I think this would be an insane feature from iOS and android respectively – Rossco May 19 '15 at 10:46

3 Answers3

9

It's crazy that facebook doesn't have the latest URI schemes documented. Whatsapp, twitter, mail, sms, tel all have them available and are working.

Whatsapp:

whatsapp://send?text=Hello%20World!

Twitter:

twitter://post?message=hello%20world!

Mail:

mailto:<address>[?<header1>=<value1>[&<header2>=<value2>]]

SMS:

sms:+15105550101?body=hello%20there

Tel:

tel:<phonenumber>

I've been researching methods of HTML5 interaction with phone features (intents), maybe there is a way to open the mobile phone share menu from a web url? This would allow the user to share an article, per say, with any native app if installed (fb, twitter, etc...)

Gowtham Raj
  • 2,915
  • 1
  • 24
  • 38
Jamil
  • 91
  • 1
1

I don't know if you've come across this thread, but the guy seems like did some reverse engineering and has a full list of all Facebook custom URL schemes

Community
  • 1
  • 1
Islam
  • 3,654
  • 3
  • 30
  • 40
  • These were mentioned in the post above but these are breaking. See the comments under the post you linked to – cjds Dec 17 '14 at 15:26
  • I couldn't find a better information than that... I'm seeing the only option as writing a native app (even as simple as just using UIWebView to display the website's content + have full control of being a native app). – Islam Dec 17 '14 at 15:41
  • This is all ancient... most of them do not work with the current version. – coneybeare Dec 17 '14 at 19:06
0

In short there is NO official or unofficial way to do this anymore (or yet).

The URL schemes above described was never documented as an official way to open the the sharing dialog.

BUT

There is the new AppLinks framework.

The App Links framework is documented here

What it does is basically allows you to have meta tags on certain URLs that let you launch your (or any) app from Facebook. Basically Facebook checks if your page supports an app link and then links directly to your app

So, theoretically it should be simple to launch the Facebook app from your browser if you have it and if not load another link. (which is basically what you need). However even though Facebook created it they haven't put it on their pages yet. (in other words in the future these meta tags might work to open the apps).

Community
  • 1
  • 1
cjds
  • 8,268
  • 10
  • 49
  • 84
  • Applinks will tell anyone browsing Facebook that sees my url to open in my app (or safari), but that is the opposite of what I want. I need somebody viewing my page in safari to share the page to Facebook. Facebook would need to publish their deeplink in order for this to work, something that , as you point out, they have not done. – coneybeare Dec 17 '14 at 01:05
  • Do you have a source for: "In short there is NO official or unofficial way to do this anymore (or yet)." – coneybeare Dec 17 '14 at 01:05
  • In short no. My knowledge on the subject comes from combing through Facebook docs with a fine tooth comb and this http://stackoverflow.com/questions/26106447/is-it-possible-to-generate-a-share-on-facebook-link-that-opens-the-native-face among other links. I could be wrong. I really doubt though – cjds Dec 17 '14 at 05:21
  • Yeah, I did that too. This is why I started this bounty though, so a more official answer could be found. – coneybeare Dec 17 '14 at 13:15
  • After quite a bit of searching I came to the conclusion posted above. It seems clear that they do not want us scraping through their app – cjds Dec 17 '14 at 16:13
  • I know it is possible with Javascript, but I don;t want to expose my readers to a ton of unnecessary user tracking, and it doesn't solve the problem of having them login through the mobile web on their devices. FWIW, this url still works on some Android versions using intents, but I mainly use iOS so am focusing on that here. – coneybeare Dec 17 '14 at 19:08
  • I appreciate the time you have spent on the question, but you really have said nothing that I haven;t found when searching existing threads and from personal experience. The bounty on this question was setup to get a canonical answer, something official either for or against. I cannot award the bounty to another "best guess" that revealed nothing new. – coneybeare Dec 17 '14 at 19:10