N.J.
N.J.

Reputation: 699

Share via FBSDKShareDialog ignores applink defined on target page

This has been driving me nuts all day:

I have an iOS app with a custom URL scheme defined, and am trying to share a link on FB which points to a page that has this scheme in its applink meta tags, so that tapping it should fire up my app.

Every little piece of it is working just fine. I can enter my URL scheme in safari on the phone and the browser launches my app. I have tested my webpage with the FB debug tool and there are no errors or warnings - it correctly identifies all the meta tags.

If I share the link using FB on the phone or on my laptop, all works fine.

HOWEVER, if I share the exact same link using FBSDKShareDialog, it does not work. It just opens the web page with the meta tags as if it was any regular web page.

Anyone has any idea why these two ways of sharing would be different? They look exactly the same otherwise.

Upvotes: 2

Views: 2007

Answers (2)

gunjot singh
gunjot singh

Reputation: 2598

There could be two possible issues:

  • Either the one told by @NJ, i.e. you are just trying to open the link in Facebook app, using the same device from which you posted the link.'

Solution - either open link in other device or cose and re-open your facebook app and do multiple refresh

  • Or You have some error in your meta tags. There is one important thing though, that Facebook never mentions, i.e. they cache the URL you provide. So any one used the web link with meta tags the first time in Facebook, Whole meta tags will be cached, and you updated meta tags won't be parsed by facebook.

Solution

To get over with the issue, use below link Facebook debug tool

Input your meta data included web page URL and

-click on show existing scrape information to find any error

  • Click on Fetch new scrape information for refreshing your URL on facebook. it will clear the cache for that URL in facebook server.

Upvotes: 0

N.J.
N.J.

Reputation: 699

If anyone else runs into this problem, here's the reply from FB:

  1. When you share with mode automatic, the app does a fast app switch over to the FB app to show the native share dialog
  2. The post is cached locally on the device, and it does not know about app links (since only Facebook server side knows about it)
  3. When the user opens the FB, the user sees their cached story (with no app links behavior),

This doesn't manifest with the Web mode since the Facebook app needs to pull from the server to get the post, in which case it has all the app links info.

This is unlikely something that we'll fix. However, after a while, the cache will expire, and Facebook app will re-pull the posts from the servers, in which case the app link data will be available.

In order to test this, you can share the post on one device, and then try clicking on the post from another device. The app links should work at that point.

Which is kind of a lame response IMO - they parse the target page to build the preview, how hard would it be to remember the applink and use it?

Upvotes: 3

Related Questions