0
\$\begingroup\$

I'm trying to figure out what should I assign the appLinkUrl parameter of FB.Mobile.AppInvite method. In documentation it says:

The AppLink URL to identify your app and also used for deep-linking

Should i pass my Play Store link to it?

Thanks in advance.


The documentation page for FB.Mobile.AppInvite: https://developers.facebook.com/docs/unity/reference/current/FB.Mobile.AppInvite

\$\endgroup\$
3
\$\begingroup\$

In simple words, it is modified url to redirect user to your app via facebook app invite. For example if you have created Android Facebook app you want to use facebook app invite through your game, then go to this url and in Modify an existing App Link URL? field enter your existing Facebook id in this format: https://fb.me/FACEBOOK_APP_ID that will provide you the modified url in same format. That would be the url that you can use for App Invite.

NOTE: For example if you send invitation from Android. Then receiver can only see your invitation in the same device (Android in this case).

\$\endgroup\$
  • 1
    \$\begingroup\$ So i only need to add my app id at the end of fb.me/ and it's ok? \$\endgroup\$ – S. Tarık Çetin Dec 10 '15 at 22:29
  • \$\begingroup\$ Yea, but you need to be modify it by link given :) \$\endgroup\$ – Hamza Hasan Dec 11 '15 at 2:53
3
\$\begingroup\$

It is NOT play store link or your web page link. It is a link to specially setup page that must response with applink format, see an example in App invite documentation. Looks like this:

<html>

<head>
  <meta property="al:ios:url" content="couchinapp://invite_from_fb?referral=123456789" />
  <meta property="al:ios:app_store_id" content="123456789" />
  <meta property="al:ios:app_name" content="Couchin'" />
  <meta property="al:android:url" content="couchinapp://invite_from_fb?referral=123456789" />
  <meta property="al:android:app_name" content="Couchin" />
  <meta property="al:android:package" content="com.mycompany.couchin" />
  <meta property="al:web:url" content="http://www.couchinapp.com/myapp.html" />
</head>

<body>
  Couchin App Link
</body>

</html>

If you pass something else or another page that has wrong format, it will trigger "Applink URL error" upon inviting people. You can setup this kind of page on your own server or let FB generate it for you by hosting app link on Facebook

Advanced technique:

And actually, this deep link string will also reach the another party that you are inviting, says B, when B click on notification on his Facebook feed. If the URL looks like -ttps://fb.me/123456789, you can append query string on A side like:

-ttps://fb.me/123456789?from=A&reward=100&couponcode=1234

Which on B's app side, can process this URL via "deep link" or "deferred deep link", so B can see from=A&reward=100&couponcode=1234 part and act according to it. It is quite complicate process so I will leave that work for reader to search.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.