Waheed Akhter
Waheed Akhter

Reputation: 347

How to generate app link url using facebook app link tool for android app?

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?

Upvotes: 0

Views: 1734

Answers (1)

Ming Li
Ming Li

Reputation: 15662

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

Upvotes: 1

Related Questions