Facebook App Invite challenges

88 Views Asked by At

I checked out a couple of other articles regarding this topic, but still no luck.

The problems that I are:

  1. The friend (brand new never authorized for my app) does not receive any notification on an Android device.

  2. The FacebookCallBack was not invoked after the invite was sent. Below is the code sample.

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

1

There are 1 best solutions below

0
On BEST ANSWER

The cause of my problem was I was using the development API key, but production content provider...yes, what a dumba**. :)