Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook FBSDKAppInviteContent - Missing App Link URL

Do you need to have your own website with meta tags for your app link url to use the FBSDKAppInviteContent and FBSDKAppInviteDialog to invite friends?. If I put just the app link url there,

It shows an error saying something like

Missing App Link URL The app link used with this invite does not contain an Android or iOS URL. Developers are required to enter a URL for at least one platform.

I'm using facebook-sdk iOS and also fbsdksharekit. Does anyone know how to solve this error or warning?

like image 356
Shuin Avatar asked Apr 29 '15 05:04

Shuin


2 Answers

Yes, You have to add meta tags of your app link url in your website.


iOS

As an example, let's say you've got a page located at:

http://example.com/applinks

In that page you need to add some metadata to describe what app will handle it:

<html>
<head>
    <meta property="al:ios:url" content="example://applinks" />
    <meta property="al:ios:app_store_id" content="12345" />
    <meta property="al:ios:app_name" content="Example App" />
    <meta property="og:title" content="example page title" />
    <meta property="og:type" content="website" />
    <!-- Other headers -->
</head>
<!-- Other HTML content -->
</html>
</head>
like image 188
Vizllx Avatar answered Sep 18 '22 15:09

Vizllx


For those who want know and asking how does it work, appLinkUrl is not the url of your app in the market. Here's the way I did this.

  • You need to make your own appLinkUrl and put it in your info.plist(see:http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html) that you'll be using for deepLinking.
  • Then after you declare it on your info.plist, you must have at least an html web page where you can put the meta tags for the appLinks of ios or android(https://applinks.org). Take note the the appLinkUrl that you have put on your info.plist should be the same on your meta property="al:ios:url
  • Debug your website url and check your meta tags using facebook url debugger. Press "Fetch new scrape information" to update the meta tags for any changes on it.
  • Use the link of your webpage that has the meta tags and use it like on the sample on facebook docs

    FBSDKAppInviteContent *content =[[FBSDKAppInviteContent alloc] init]; content.appLinkURL = [NSURL URLWithString:@"your_website_link_with_metatags"];

  • Just make sure your meta tags have the right information and that's it!
like image 31
Shuin Avatar answered Sep 19 '22 15:09

Shuin