invite friends with facebook sdk error

206 views Asked by At

i followed facebook documentation to invite my friends in my application that has two platforms (android & ios) and i want to invite my friends to install the app But when found this error

enter image description here

so i have two platforms so i created html file in my own server and put through it (to test first with android platform then i will add ios links)

   <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml"    
    xmlns:fb="https://www.facebook.com/2008/fbml"><head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title>my app </title>


 <meta property="al:android:urlcontent="https://fb.me/1047369566223853">
<meta property="al:android:app_name" content="myapp">
<meta property="al:android:package" content="com.myapp.android">

<meta property="og:title" content="myapp">
<meta property="og:type" content="website">
<meta property="fb:app_id" content="9935316166414594">
<meta property="og:image   
  content="http://myimage.jpg">

 <body>
 </body></html> 

this is facebook documentation

    <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>

in java code i used

 String appLinkUrl= myserverip/folder/myhtmlfile.html

//myhtmlfile which contains links on my server
    AppInviteContent content = new AppInviteContent.Builder()
            .setApplinkUrl(appLinkUrl)
            .setPreviewImageUrl(previewImageUrl)
            .build();
    AppInviteDialog.show(InviteFacebookFriends.this, content);
    this.finish();
1

There are 1 answers

1
Rohit5k2 On BEST ANSWER

AppLink is not the URL of your app, but it is the URL which links to a content inside your app.

Looks like you are not using correct AppLink URL. Please verify your AppLink.

If you don't have the URL yet, you can create here