title: Facebook App Invite, Invite Friends
body: <p>I switched to Facebook 4.0 in order to implement AppInviteDialog for Android. I followed <a href="https://developers.facebook.com/docs/app-invites/android" rel="nofollow noreferrer">this reference</a>.</p>
  
  <p>The dialog appears, I can select friends, invite them, I get the <code>onSuccess()</code> call, but my friends don't get the invite.</p>
  
  <p>I have used the below applink URL: https://fb.me/****412097*****</p>
  
  <p>No previewImageURL although I saw my app's image on the dialog.</p>
  
  <p>Code:</p>
  
  <pre><code>//Inside onCreate -
  
          callbackManager = CallbackManager.Factory.create();
  
          mInvititeDialog = new AppInviteDialog(this);
          mInvititeDialog.registerCallback(callbackManager,
                  new FacebookCallback&lt;AppInviteDialog.Result&gt;() {
  
                      @Override
                      public void onSuccess(Result result) {
                          NetworkController.showCustomToast(
                                  InviteFriendsActivity.this,
                                  "Invitation Sent Successfully!");
                          finish();
                      }
  
                      @Override
                      public void onCancel() {
                          Log.d("Result", "Cancelled");
                          NetworkController.showCustomToast(
                                  InviteFriendsActivity.this, "Cancelled");
                          finish();
                      }
  
                      @Override
                      public void onError(FacebookException exception) {
                          Log.d("Result", "Error " + exception.getMessage());
                          NetworkController.showCustomToast(
                                  InviteFriendsActivity.this,
                                  "Error while inviting friends");
                          finish();
                      }
                  });
  
  
      if (AppInviteDialog.canShow()) {
              AppInviteContent content = new AppInviteContent.Builder()
                              .setApplinkUrl(appLinkUrl).build();
  
              AppInviteDialog.show(InviteFriendsActivity.this, content);
  
      }
  
      @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
          // TODO Auto-generated method stub
          super.onActivityResult(requestCode, resultCode, data);
          callbackManager.onActivityResult(requestCode, resultCode, data);
  
      }
  </code></pre>
  
  <p><em>No help from below similar links (even though they are from ios)</em></p>
  
  <p><a href="https://stackoverflow.com/questions/23235506/code-for-fb-invitation-not-working">Code for fb invitation not working</a></p>
  
  <p><a href="https://stackoverflow.com/questions/27547826/facebook-app-invites-issue">https://stackoverflow.com/questions/27547826/facebook-app-invites-issue</a></p>
  
  <p><a href="https://stackoverflow.com/questions/23659932/facebook-app-invite-not-received">Facebook App Invite not received</a></p>