Reputation: 424
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?
Upvotes: 13
Views: 12726
Reputation: 1324
Maybe Facebook App Links Hosting API will be of help
"If your application doesn't have a website for content you want to share to Facebook, you don't have public web URLs which you can annotate to support App Links.
For these types of apps, Facebook provides an App Links Hosting API that will host App Links for you. With the Hosting API you can create and manage your App Links for all the mobile environments you support."
Source: https://developers.facebook.com/docs/applinks/hosting-api
Upvotes: 2
Reputation: 6205
In addition to the other answers it is also nice to know that you can use https://developers.facebook.com/tools/debug/ to refresh your applink url's scrape information. If you initially placed incorrect values in the meta tags it will not be refreshed right away unless you go to that link and explicitly refresh it.
Upvotes: 3
Reputation: 511
Adding meta tags would solve this, this is snippet of html from app link created via FB. Fb is adding some extra meta tags on it's app link url page, and it also redirects direct to itunes if opened on a browser.
<html>
<head>
<title>app name</title>
<meta property="fb:app_id" content="your fb app id" />
<meta property="al:ios:url" content="Your app link url" />
<meta property="al:ios:app_name" content="your app name" />
<meta property="al:ios:app_store_id" content="your app id" />
<meta property="al:web:should_fallback" content="false" />
<meta http-equiv="refresh" content="0;url=https://itunes.apple.com/WebObjects/MZStore.woa/wa/redirectToContent?id=your app store id" />
</head>
<body>
Redirecting...
</body>
</html>
Upvotes: 1
Reputation: 424
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.
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"];
Upvotes: 8
Reputation: 9246
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:
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>
Upvotes: 11