3
            String appLinkUrl, previewImageUrl;
            final String TAG = "fbv4";
            appLinkUrl = "https://fb.me/1161673067......";
            previewImageUrl = "mydomain.com/my_invite_image.jpg";

            if (AppInviteDialog.canShow())
            {
                AppInviteContent content = new AppInviteContent.Builder()
                        .setApplinkUrl(appLinkUrl)
                        .setPreviewImageUrl(previewImageUrl)
                        .build();
                AppInviteDialog.show(MainActivity.this, content);
                AppInviteDialog appInviteDialog = new AppInviteDialog(activity);
                appInviteDialog.registerCallback(callbackManager, 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());
                    }
                });

                appInviteDialog.show(content);
            }

This is my code for facebook invite friend with facebook-sdk.4.0. My invite dialog is open correctly with friendlist and showing invite is send correctly but no invite get to friend. get success in log all process is going correct but i don't get any notification of my app.

Mohammad Zaid Pathan
  • 16,304
  • 7
  • 99
  • 130

1 Answers1

0

@zephyr

Yes, I was facing notification blocking issue from facebook user settings please try this so maybe it will helpful for you as well as it was worked for me.

Click in the top right of Facebook and select Settings
Click Notifications in the left menu
Click Edit next to On Facebook
Click Edit next to App requests and activity
Click to set the notifications for the app or game to On