Search code examples
androidfacebookapplinks

Android Facebook requires reset for applinks to work


I have an applinks enabled app, together with applinks enabled webpage (pointing to the app). I'm trying to do this workflow:

  1. In my app, share a link to my webpage as ACTION_SEND with EXTRA_TEXT
  2. The webpage (e.g. http://lovelikeorhate.eu/question/LIKE/504) contains all the applinks and Facebook specific tags. You can try curl to see it.
  3. Facebook creates a correct preview, using the og:title meta tag from the webpage. Facebook Object Debugger (https://developers.facebook.com/tools/debug/og/object/) doesn't show any errors and reports the Android App Links as present.
  4. When I submit the post to Facebook and then click it in the Facebook app, a browser opens, i.e. applinks are not working.
  5. If I re-login in Facebook, then the applink works as expected, starting my app. Merely deleting cache, killing Facebook app or restarting the device is not enough.

Any ideas what's causing this weird behavior? What should I change to make the applinks work on the first attempt?


Solution

  • I wouldn't worry about this as it's an edge case. The Facebook app may sometimes cache the result of your post, and won't necessarily have all the app links data on your device. However, users on other devices will have the appropriate app links data and link to your app. Eventually, the Facebook app will also refresh its data, and you'll be able to link from your device as well.