I've double checked everything, from my understanding this is all I need to do:
self.inviteContent = [[FBSDKAppInviteContent alloc] initWithAppLinkURL:[NSURL URLWithString:@"http://mywebsite.com"]];
[FBSDKAppInviteDialog showWithContent:self.inviteContent delegate:self];
On mywebsite.com I have this in the heading (example values shown here):
<html>
<head>
<title>My Website</title>
<meta property="al:ios:url" content="appurl://action">
<meta property="al:ios:app_store_id" content="1234567">
<meta property="al:ios:app_name" content="My App">
</head>
<body>
...
</body>
</html>
So the dialog switches over the to the latest Facebook iOS app. I write a message and pick the person I want to send the invite to, hit send and I get this error:
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.
What am I doing wrong?
My app handles the custom URL fine because if I enter appurl://action
in Mobile Safari it opens my app up.
You need to create an AppLink
URL from here/
Choose your application from the list
Fill up the form with equivalent information
Click on Next !
You're done.
Now, you can use that link with your code for invite.
self.inviteContent = [[FBSDKAppInviteContent alloc] initWithAppLinkURL:[NSURL URLWithString:APP_LINK_HERE]];
[FBSDKAppInviteDialog showWithContent:self.inviteContent delegate:self];
The format of that link will be something like https://fb.me/xxxxxxxxxxxxxxxx
All x
s will be replace by a digit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With