0

I have created an android app that I haven't yet published to google play but I want to implement facebook app invites. I read the documentation on facebook but I just couldn't get what this app link url is and how to generate it using app link tool since I am not hosting any website for this app link url. Could somebody help me please?

String appLinkUrl, previewImageUrl;

appLinkUrl = "applinkurl";
previewImageUrl = "imageurl";

if (AppInviteDialog.canShow()) {
    AppInviteContent content = new AppInviteContent.Builder()
                .setApplinkUrl(appLinkUrl)
                .setPreviewImageUrl(previewImageUrl)
                .build();
    AppInviteDialog.show(this, content);
}

I don't have any website and neither have I published my app on google play..... suppose just for the sake of testing I use any of google play's app link. could you explain now?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Waheed Akhter
  • 347
  • 2
  • 13

1 Answers1

1

The applink url allows you to encode 3 pieces of information per native platform:

  • The app's name
  • How to open the app if it's installed
  • How to install the app if it's not installed

This way, you can give app invites a single URL rather than 3 different pieces of information. It also gives you control to change that info later on.

If you don't have a website, you can go use this tool which will create a URL for you: https://developers.facebook.com/tools/applinkshost

Ming Li
  • 15,672
  • 3
  • 37
  • 35
  • I went to the website and created an Android link. But there's no field for me to select the link and provide it as `String` in my app. Can you please clarify this for me? There's the `URL` field, `AppName` and `Package`. I can't type any URL since I don't have it, I only filled in `AppName` and `Package`. But, where do I select the URL? – jlively Apr 28 '17 at 09:36
  • Link is not working anymore, can someone provide a new link or an updated answer? – Naman Dec 20 '17 at 08:34
  • 1
    App Links hosting has been deprecated. – Ming Li Feb 06 '18 at 01:07