1

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.

Flávio Faria
  • 6,575
  • 3
  • 39
  • 59
  • Hello , i want to integrate App links from Facebook mobile hosting api. It will be great help for me if you post code for the same. i have already asked question regarding. – Harsh Trivedi Jul 31 '17 at 11:08

1 Answers1

1

There are a couple of things to try and take note of:

  1. 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/

  2. 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.

Ming Li
  • 15,672
  • 3
  • 37
  • 35
  • 1. The debugger says "Failed to get composer template data." to my own URL. This message is not very helpful and I couldn't find much info about it. 2. Yes, I pasted it directly into a status update, but I did it from the web site rather than from the app. I tested on someone else's device with no luck. :( – Flávio Faria Apr 08 '15 at 18:19
  • Here is the FB-generated URL: https://fb.me/797896653634927 Here is my custom URL with the same content: http://jsbin.com/foseyuhura – Flávio Faria Apr 08 '15 at 18:21
  • I clicked on "Fetch new scraped information" and it worked, however, it doesn't show any app links tags, perhaps because you're trying to add them via javascript? – Ming Li Apr 08 '15 at 19:53
  • I wasn't trying to add them via Javascript. If you curl the URL you'll see that its content is as simple as the code snippet I included in my question. The debugger is really working right now, I don't know if it's due to some caching or some crawling process. I also tested it again and the link is working, not sure why it wasn't before. – Flávio Faria Apr 09 '15 at 14:16
  • Test App Redirecting... – Radu Jun 09 '15 at 06:51
  • This is mine, hosted on FB's mobile links it works, hosted on my machine it fails.....no clue why – Radu Jun 09 '15 at 06:51
  • Did you try it in the URL debugger I linked to above? It should tell you what's failing. – Ming Li Jun 09 '15 at 19:17