I checked out a couple of other articles regarding this topic, but still no luck.
The problems that I are:
The friend (brand new never authorized for my app) does not receive any notification on an Android device.
The FacebookCallBack was not invoked after the invite was sent. Below is the code sample.
The only difference that my case is different than the example is that I try to implement this in a fragment.
Can someone help? Thanks!
AppInviteContent content =
new AppInviteContent.Builder()
.setApplinkUrl(Constant.facebookAppLink)
.build();
AppInviteDialog dialog = new AppInviteDialog(this.getActivity());
dialog.registerCallback(
CallbackManager.Factory.create(),
new FacebookCallback<AppInviteDialog.Result>() {
@Override
public void onSuccess(AppInviteDialog.Result result) {
Log.d("Invitation", "Invitation Sent Successfully");
}
@Override
public void onCancel() {
}
@Override
public void onError(FacebookException e) {
Log.d("Invitation", "Error Occured");
}
}
);
dialog.show(this, content);
I did check my AppLink URL and it is working correctly.
The cause of my problem was I was using the development API key, but production content provider...yes, what a dumba**. :)