In short: Everything seems to be working on the client side, but nothing received for the Facebook target friend.
These are the detailed steps with code and screenshots:
AppInviteContent content = new AppInviteConent.Builder()
.setApplinkUrl("App link url created via the Facebook AppLink creator tool")
.setPreviewImageUrl("http://www.redacted.com/previewImage.png")
.build();
appInviteDialog.show(this, content);
This results in a dialog being shown with a preview of a link to the install of the app, and the option of entering a message at the top:
I then click next, select one or more friends and click the top right Send button:
The result is a seemingly successful send:
I attached a callback as well to make sure it was actually a successful send:
appInviteDialog.registerCallback(facebookCallbackManager, new FacebookCallback<AppInviteDialog.Result>() {
@Override
public void onSuccess(AppInviteDialog.Result result) {
Log.d(TAG,"onSuccess result = "+ result.getData().toString());
}
@Override
public void onCancel() {}
@Override
public void onError(FacebookException e) {
Log.d(TAG,"onError message = "+ e.getMessage());
}
});
This prints out "onSuccess result = Bundle[{didComplete=1}]"
Expected result: Friend receives a notification. Actual result: Friend receives nothing.
Some more information that might be helpful:
- App is only available on android.
- Notification is not received on any platform including Facebook android app.
- The App link url has been confirmed working by clicking on it in the Facebook android app. (It creates a popup linking to the Google Play Store)
- Single Sign On has been enabled and user is logged in, although should not be necessary according to the AppInviteDialog documentation on Facebook.
- Tried this with the target user not already having authorized the app, and also with user that already had the app installed. Same results.
- The Facebook SDK version I am using is 4.0.0
It's frustrating because everything seems OK, and there is no way (that I know of) to debug this problem.
I hope someone can help me or point me in the right direction.
Thank you!