FaceBook App Invite with custome URL scheme iOS - ios

I am trying to realize App Invite feature for iOS app. All works good except custome URL Scheme with parameter (like referral).
iOS app has two URL Schemas:
fb123456789712345://
myappurlscheme://
Meta tags in web server:
<meta property="al:ios:url" content="myappurlscheme://fb_app_invite?referral=referralname" />
<meta property="al:ios:app_store_id" content="123456789" />
<meta property="al:ios:app_name" content="MyApp" />
<meta property="al:web:should_fallback" content="false" />
<meta property="fb:app_id" content="123456789712345"/>
When FB user clicks on the App Invite from their profile i'am expecting than iOS app will be open with URL(myappurlscheme://fb_app_invite?referral=referralname),
but in practice i get URL(fb123456789712345://authorize#access_token=ZXZXZXZXZXZXZXZXZXZXZX&expires_in=86400&target_url=%2Fappcenter%2$454545454545454%3Frequest_ids%3D3333333333333%26ref%3Dapp_invite_inbox%26content%3Dinvite%222222222222222222)
I dont know how to figure out to use custome URL Schema for parse referralname. Please, help me. Where i had mistaken?

Related

Smart Banner not coming

I have published my app on iOS Appstore. To show smart banner I use following code on my webpage.
<html>
<head>
<title>Kinjal's Games</title>
<meta name="apple-itunes-app" content="app-id=6444216110, app-clip-bundle-id=com.kinjal.brainbooster"/>
</head>
<body>
Yo
</body>
</html>
When I load webpage, it shows banner for 1 sec and then disappears immediately.
To verify, I tried by using other app's Appstore id. If I try using facebook's app id, it works.
<meta name="apple-itunes-app" content="app-id=284882215, app-clip-bundle-id=com.kinjal.brainbooster"/>
But it doesn't work only with my app id
<meta name="apple-itunes-app" content="app-id=6444216110, app-clip-bundle-id=com.kinjal.brainbooster"/>

Shares with og:video links instead of plays in Facebook app (ios)

I've got a web page i want to share on Facebook.
The page has a set of Open Graph meta datas, including the og:video setup:
<meta property="og:url" content="https://example.com/mypage />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="My Site"/>
<meta property="og:title" content="My Title" />
<meta property="og:description" content="My Description" />
<meta property="og:image" content="https://example.com/mymovie.jpg" />
<meta property="og:video" content="https://example.com/mymovie.mp4"/>
<meta property="og:video:secure_url" content="https://example.com/mymovie.mp4" />
<meta property="og:video:type" content="video/mp4" data-content-type="dynamic">
When shared, and browsed in a web browser on desktop, the video gets embedded - just as expected. However, when browsed inside the IOS Facebook app (iPhone 7, latest version), a click on the play button results in a navigation to the og:url (or maybe rather the shared url, which is the same).
How come?

Convert Custom URL scheme to QR code (IOS)

My question is what can I do to convert the custom URL scheme to a QR code that can open an app.
Let's say I have a custom URL (myScheme://). It works if I type it on my phone's browser.
But if I just convert it through some online qr code generator, the qr code reader is not going to open the url in browser and just return me a plain text.
Does it mean I need to build an own QR code reader to handle it?
I think it depends on QR Code Reader apps. In my situation I have a custom URL (itms-services://?action=download-manifest&url=xxx) QR Reader for iPhone works. But some customers said: "I can't install the app. QR just opens Safari.". There are so many QR Reader apps and we don't know which one is used.
But you can use your own web-site something like this:
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0, maximum-scale=1.0" />
<title>Site Name</title>
<style>#media screen and (max-device-width:480px){body{-webkit-text-size-adjust:none}}</style>
<!-- implement javascript on web page that first first tries to open the deep link
1. if user has app installed, then they would be redirected to open the app to specified screen
2. if user doesn't have app installed, then their browser wouldn't recognize the URL scheme
and app wouldn't open since it's not installed. In 1 second (1000 milliseconds) user is redirected
to download app from app store.
-->
<script>
window.onload = function() {
<!-- Deep link URL for existing users with app already installed on their device -->
window.location = 'yourapp://app.com/?screen=xxxxx';
<!-- Download URL (MAT link) for new users to download the app -->
setTimeout("window.location = 'http://hastrk.com/serve?action=click&publisher_id=1&site_id=2';", 1000);
}
</script>
</head>
<body>
<!-- button to Download App for new app users -->
<form action="http://hastrk.com/serve?action=click&publisher_id=1&site_id=2" target="_blank">
<input type="submit" value="Download" />
</form>
<!-- button to Open App to specific screen for existing app users -->
<form action="yourapp://app.com/?screen=xxxxx" target="_blank">
<input type="submit" value="Open App" />
</form>
</body>
</html>
Then you should generate QR with website url. It will open in Safari and will redirect your app. (I hope so.)

iOS10 Messages Link Preview Image

Any iOS10 beta testers out there know if Messages uses a syntax similar to Facebook Open Graph to set things like meta descriptions and images?
I'm building a site and would like to have it ready for when iOS10 is launched.
Here's the type of stuff I'm talking about:
<!-- Facebook Meta -->
<meta property="og:title" content="Site | Title of Page" />
<meta property="og:image" content="http://www.domain.com/im-content/social-post-images/facebook image.png" />
<meta property="og:url" content="http://www.domain.com" />
<meta property="og:site-name" content="Site | Title of Page"/>
<meta property="og:type" content="website" />
<meta property="og:description" content="Here is a description of my site that will show up in the Facebook card." />
And here's the image/info I'm trying to control:
It's at least using Open Graph and Twitter Card.
Demos
Open Graph
Markup:
<meta property="og:image" content="https://www.j-26.com/assets/facebook.jpg"/>
Preview:
Twitter Card
Markup:
<meta name="twitter:image" content="https://www.j-26.com/assets/twitter.jpg"/>
Notable findings
I tested this page using Twitter Card and Open graph and iOS seemed to prefer Open Graph. On the test page, the Twitter Card markup is placed before the Open Graph markup and the image used for Twitter Card is smaller than the one used in Open Graph. Despite the smaller size and earlier placement, iOS chose to display the image from Open Graph.

Facebook App Invites iOS v4 SDK error

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 xs will be replace by a digit.
Try to add also og:title and og:type properties, it works for me
<meta property="og:title" content="My App" />
<meta property="og:type" content="website" />
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>

Resources