6

I am trying to implement deep linking in my ios app. Whenever i post a link through FB app, the link will be the page i have create with all the meta tags set up properly. The only problem is when i click on the link in FB app, it just open a web page and there is a button on top of the page, on click of which it takes me to my app. I want that my app should open directly when i click on link on FB app.

HTML File :http://50.62.166.231:84/mpulse/services/DeepLinkingPages/DeepTest.html

All meta tags are there set up.

Also attaching the screen shot of the page which open when i click on my share from fb app.

http://s17.postimg.org/fuly4wyov/IMG_0530.png

AKumar
  • 381
  • 6
  • 16

2 Answers2

4

I am unable to view your HTML file however I guess you have run into the same problem as I have.

It seems Facebook has their own take on how App Links should be handled as is shown here: App Links on iOS

Basically they've add this "Mobile Only" check that appears to look for "al:web:should_fallback" set to "false". If that is the case it will then immediately open your app or go to the app store if it is not installed on the device.

They fail to mention this in the documentation and it sure doesn't seem to be following the spec as I would have thought the intention of a web fallback would be used in the case where the app wasn't installed. If I click on a twitter post on facebook why would I want to go to web view of twitter if the app is installed? My guess is it was done this way to try to keep people in the Facebook app and/or as a way to support their App links hosting service

Anyway, add the following to your meta data and it will probably do what you want:

<meta property="al:web:should_fallback" content="false" />
jeffjv
  • 3,461
  • 2
  • 21
  • 28
  • 1
    Did this work for you? I tried adding the tag you listed above. It did not work for me. My app is not opened directly. – cbartel May 15 '15 at 17:08
  • 3
    @cbartel It did. My guess is you have one of two problems. Either A) You made the change to a page that facebook has already cached and they are still using the old data. Try sharing a new page with a new url and see if it starts working. Or B) You still have other issues with your meta data. Best way to debug is to go to https://developers.facebook.com/tools/debug/og/object/ and type in your url and select 'Show existing scrape information'. If there are any errors it won't work. One probably I had was my og:url had a '/' at the end but the shared url didn't. – jeffjv May 19 '15 at 01:32
  • Thanks for the response. Facebook was using a cached version of the page. I went to the Facebook site you listed in step B and hit the "Fetch new scrape information" button. Then killed the Facebook iOS app and relaunched it. Then the AppLink worked as expected next time I pressed the item in the FB feed. – cbartel May 19 '15 at 17:11
  • @cbartel, glad that worked. Keep in mind though that I've seen "fetch new scrape information" fix problems in facebook's initial parse of a page so it may still be a good idea to test with a totally new url to double check your meta data is how they like it. – jeffjv May 20 '15 at 06:17
1

I know this question is a bit old but adding these lines of meta data worked for me:

<meta property="al:web:should_fallback" content="false" />
<meta property="al:ios:url" content="<appScheme>://" />
<meta property="al:ios:app_store_id" content="123456" />
<meta property="al:ios:app_name" content="Example App" />
<meta property="al:android:url" content="<appScheme>://">
<meta property="al:android:package" content="com.yourapppackage.yourapppackage">
<meta property="al:android:app_name" content="Example App">

You can read more on Facebook's Documentation

You can also test and debug your meta data with Facebook's Sharing Debugger

Dustin Spengler
  • 5,478
  • 4
  • 28
  • 36