Facebook android sdk invitation request dialog does not select the contacts to invite

245 views Asked by At

I am using FACEBOOK SDK and SIMPLE FACEBOOK to give a login in my app. When i use facebook sdk's invite api to invite my friends to join my app, it shows me a web dialog so that i can select friends to invite. But as soon as i select any of the friends, it gets selected momentarily and automatically gets deselected('plus sign' changes to 'tick mark' for a moment and changes back to 'plus' gain automatically) not allowing me to select my friends and send request. This is the piece of code i am using to show 'invite request dialog'

            OnInviteListener onInviteListener = new OnInviteListener() {
                @Override
                public void onFail(String reason) {
                    mResult.setText(reason);
                }

                @Override
                public void onException(Throwable throwable) {
                    mResult.setText(throwable.getMessage());
                }

                @Override
                public void onComplete(List<String> invitedFriends, String requestId) {
                    String print = "<u><b>Requet Id</b></u><br>" + requestId + "<br><br>";
                    print += String.format("<u><b>Invited Ids (%d)</b></u><br>", invitedFriends.size());
                    print += Utils.join(invitedFriends.iterator(), "<br>");
                    mResult.setText(Html.fromHtml(print));
                }

                @Override
                public void onCancel() {
                    mResult.setText(Html.fromHtml("<u><b>Result</b></u> <br>Canceled invitation"));
                }
            };
            SimpleFacebook.getInstance(getActivity()).invite(INVITE_MESSAGE, onInviteListener, null);

KEY POINTS:

1) I am facing this problem with XIAOMI REDMI(4.3 android) only, NO OTHER DEVICE shows this behavior.

2) On the same devices, SIMPLE FACEBOOK SAMPLE to invite friends works completely fine.

3) The URL returned by facebook to populate the web dialog is working fine on browser.

0

There are 0 answers