Lefteris
Lefteris

Reputation: 14687

Facebook Application Request not working on Android

I'm trying to send an invite for the user's facebook friends to download our Android App.

I'm using the 3.5.0 FB SDK.

The way I'm using is this one:

Bundle params = new Bundle();   
params.putString("title", "Title");
params.putString("message", "Test the thing");
params.putString("to", "FB USER ID");

WebDialog requestsDialog = (new WebDialog.RequestsDialogBuilder(getActivity(),Session.getActiveSession(),params))
                    .setOnCompleteListener(new OnCompleteListener() {

                    @Override
                    public void onComplete(Bundle values, FacebookException error) {
                        if (error != null) {
                            //Request cancelled or network error

                        }
                        else {
                            final String requestId = values.getString("request");
                            if (requestId != null) {                                    
                            }
                            else {
                                //Request cancelled, do nothing....
                            }
                        }
                    }

                })
                .build();
        requestsDialog.show();

I'm getting no error, and a valid Request Id when sending this to a FB friend of mine. But the other user is not receiving absolutely nothing.

In some cases they might get a notification, but without my message or title. Just that Lefteris did send you a request through the X app.

Any ideas why this is happening? Is there a way to debug the request id to see what is wrong ?

Upvotes: 2

Views: 1649

Answers (2)

vasanth
vasanth

Reputation: 715

If you are sending the request from your mobile application (ios or android), the app request notification is generally seen on your friend's mobile facebook app and not on the desktop.

Upvotes: 3

Lefteris
Lefteris

Reputation: 14687

Ok found the solution here

It apparently only shows a notification to the other user, only if your App is marked as "App On Facebook".

Once I did the steps in this post, my notifications appeared to the users.

Upvotes: 0

Related Questions