1

Based on http://wiki.akosma.com/IPhone_URL_Schemes#Facebook and What are all the custom URL schemes supported by the Facebook iPhone app?

I want to let the user sharing via Facebook app. (If the application not installed, I will use javascript like here.

I guess I have to use fb://post/%@ but I don't know how.

p.s. Why Facebook not publish all of this? At least I have not found..

My JavaScript code:

FB.ui({
  method: 'feed',
  name: name,
  description: message,
  link: location.href,
  picture: 'PIC_URL'
});

I am looking for a similar code in deep linking.

Mosh Feu
  • 28,354
  • 16
  • 88
  • 135

1 Answers1

1

Facebook does has a dedicated page for deep linking: Deep Linking with iOS

Unfortunately, I can’t find deep link URIs that prepares or submit a message.

Honestly, I think using the FB.ui method is the best way, and I suggest sticking to that. Alternatively, you could look into other sharing tools such as Shareaholic and AddThis.


If you’re having trouble finding schemes, I often refer to gotschemes.com. This site is a huge database containing information about schemes for many different apps. But still, no traces of Facebook allowing you to set messages.

On a side note, the script you linked to is a primitive method. I’ve bundled several best practices in a little open-source project I intend to keep up-to-date with better ways to detect whether an app is installed or not. In case you decide to implement a deep link.

Deep-link.js homepage

Tim S.
  • 13,597
  • 7
  • 46
  • 72
  • 1
    But what is "fb://post/%@"? Do you know how to use this? – Mosh Feu Jan 13 '15 at 09:43
  • @mosh Where did you find that? I don’t think it’s valid... Anyway, they work as a link: `Do thing on Facebook`. [My article about deep links was just published](http://developer.telerik.com/products/mobile-deep-linking-web-hybrid-apps/) :) – Tim S. Jan 13 '15 at 12:15
  • thanks for your answer. First, your article is just for whatsapp, and second, what "%@" means? How can I add title, caption, image and the other staff? – Mosh Feu Jan 28 '15 at 15:53
  • @mosh Nope, WhatsApp is merely an example in that article. “%@” doesn’t mean anything in particular. All Facebook documentation regarding the deep links doesn’t mention the ability to set a predefined message. That URI seems to be the only option Facebook allows. – Tim S. Jan 29 '15 at 17:15