1

I am using Unity 5.3.4f1 and Facebook SDK for unity 7.4 The problem is poor documentation and not having step by step guide to facebook SDK FB.Mobile.AppInvite in:
https://developers.facebook.com/docs/unity/reference/current/FB.Mobile.AppInvite

FB.Mobile.AppInvite(
    new Uri("www.HereGoesTheAppLinkUrl.com"),
    new Uri("https://www.dropbox.com/s/vzl519vvf4hfe3j/3DTank1200X628.png?dl=0"),
    AppInviteCallback };

The issue is what is AppLink? how to create it?
any Csharp code for that?
where is the documentation regarding this subject?
any guide example?
anyone anything? am I even asking the right questions?

1
  • In your code you never close the ( after FB.Mobile.AppInvite ALSO you never open a bracket that you close }; after AppInviteCallback
    – Stivan
    May 17, 2016 at 14:41

1 Answer 1

4

In a few newbie words - AppLink is a webpage full of meta headers. These meta headers redirect the client to appropriate application or store on their device.

E.g. if you create an AppLink page for MyXYZapp, which is an app for both iOS and Android, than probably you'll have a pseudo code in your AppLink page header like this:

//client is visiting the applink:

if the client is on Android:
 try:
  open app with bundle id `com.AndroidCompany.MyXYZapp` 
 else if MyXYZapp is not present on the device:
  redirect client to Play Store page of MyXYZapp

else if the client is iOS:
 try:
  open `com.iOSCompany.MyXYZapp`
 else:
  redirect to AppStore page of MyXYZapp

else if client is visiting from any other OS:
 redirect to AppStore / PlayStore via browser (or create your own behaviour)

EDIT: Facebook itself now provides applinks, as described here: https://developers.facebook.com/docs/applinks/index-api/

EDIT, THIS NO LONGER WORKS:

Now most people do not own servers to host these kinds of pages so facebook offers free hosting and very easy tool to generate AppLinks for your apps: https://developers.facebook.com/quickstarts/?platform=app-links-host

read more here: https://developers.facebook.com/docs/applinks/hosting-api

p.s. hope the URLs don't decay and dissolve through the coming centuries

p.p.s the URLs have decayed under 2 years. Crazy

5
  • This helped me .. but my reputation is 0 so I cannot vote up! - Thank you this was helpful - thanks for simple choice of words to explain this to me. - I know 100% how easy this question is .. still documentation is confusing! - as you said I hope this URLs dont be removed with time .. because some on their documentation where not working and thats main reason why I was confused .. App + Link too general for google search results.
    – Murad Dasi
    May 18, 2016 at 7:32
  • you don't need reputation to accept answer, just click on a tick to the left of the answer and the question will be marked as solved May 18, 2016 at 10:03
  • @NikaKasradze Hi, your answer is great! But when I use Create App Links to create Applink, but when I typed "fb.me/myFacebookAppID" in the field, it is said "The App Link URL is invalid or not created with Facebook's Mobile Hosting API for App Links." The myFacebookAppID gots from my Facebook Developer page. So it is prob not created by Facebook's Mobile Hosting API. My question is, how can I get a url created with Facebooks's Mobile Hosting API?
    – milanow
    Aug 11, 2016 at 0:43
  • @MuradDasi Also, have you successfully created it? Can u help me out?
    – milanow
    Aug 11, 2016 at 0:47
  • ّI did. what you need to do is click on developers.facebook.com/quickstarts/?platform=app-links-host .. the Idea is .. applink allows users to go to your application download page on IOS or Google Play or if he is using a PC or Mac he is taken to Default website .. now think about it logically how will this happen? you need 1 link .. which is applink .. you make applink linking all 3 links website play store and IOS store to make 1 link which then you add to your code.
    – Murad Dasi
    Aug 11, 2016 at 11:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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