Reputation: 6605
I'm trying to make App Links work with my Android app. I added metatags to my site as suggested by the docs, but when I paste my website URL on Facebook and click on it from Facebook Android app, the internal browser opens up and shows the content of my website rather than taking me to the app.
Then, for the matter of testing, I decided to generate a link using Mobile Hosting API. Everything worked as expected. So, in order to break down what I could be doing wrong in my page HTML, I checked the source code of the link generated by the Mobile Hosting API. Here goes its content:
<html>
<head>
<title>Title</title>
<meta property="fb:app_id" content="{app-id}" />
<meta property="al:android:package" content="{package-name}" />
<meta property="al:android:app_name" content="{my-app-name}" />
<meta property="al:android:url" content="{url-with-custom-scheme}" />
<meta property="al:web:should_fallback" content="false />
<meta property="al:web:url" content="{website-url}" />
<meta http-equiv="refresh" content="0;url={website-url}" />
</head>
<body>Redirecting...</body>
Then, I created an empty HTML file, copied and pasted the content of the generated link into it and then I hosted it on my server. I thought it would work this time, but the link was opened inside the Facebook internal browser again.
So, it seems that Facebook App Links only work with links generated by its API. However, the docs suggest that it should work by simply adding the metatags to my site. Am I missing something?
Thank you.
Upvotes: 1
Views: 1315
Reputation: 15662
There are a couple of things to try and take note of:
Use the URL debugger to see what the FB scaper sees of your website, and whether there are any issues: https://developers.facebook.com/tools/debug/
Are you copy/pasting the url directly into a status update on the FB Android app? If so, try posting from the web, or check your post on another device. The reason is, sometimes the app will cache a post that's made locally (before it has gotten the app links metadata), but clients on other devices will have the updated information.
Upvotes: 1