Send Facebook Request From Android Does Not Show Message Preview And Does Not Send To Friends
In my android app, after the Facebook login and authentication, user is allowed to send the request to his friend to invite them to join the app. Moreover, I need to know who is in
Solution 1:
Your code above doesn't have target/destination id. before sending a request you need to:
- Get the list of facebook friends (example here: Android: get facebook friends list)
- Show a dialog with friends... (an activity.. fragment.. or anything else.) and let user choose friend he want to invite (You need target user identifier ID)
Send the request in the following way:
Bundle postParams = new Bundle();
postParams.putString("message", title);
postParams.putString("data", message);
postParams.putString("to", target);
WebDialog requestsDialog = (new WebDialog.RequestsDialogBuilder(getMainActivity(), Session.getActiveSession(), postParams)).setOnCompleteListener(new ApplicationRequestCallback()).build();
where ApplicationRequestCallback is a class that implements OnCompleteListener
Solution 2:
Ahmadi , Even i faced the similar issue . Later i fixed by disabling from sandboxmode and Providing Canvas URL in facebook app registration. If this answer is helpful reply back.
Post a Comment for "Send Facebook Request From Android Does Not Show Message Preview And Does Not Send To Friends"