14

I am aware that invitable friends (https://developers.facebook.com/docs/games/invitable-friends/v2.0) requires canvas and category game. And I have also requested for user_friends permission on initial approval of the user. I have done all that and when I use /me/invitablefriends in graph api it returns the desired results. But when I try to do the same with facebook plugin in phonegap I get the following error. "The operation couldn't be completed. (com.facebook.sdk error 5.)

$("#invitefriends").click(function() {
    facebookConnectPlugin.api("me/invitable_friends", ["user_friends"], function (response) {
         alert(JSON.stringify(response));
    }, function (error) {
         alert("error "+error);
    });
});
4
  • My guess would be that it should look something like: facebookConnectPlugin.api("me/invitable_friends", function (
    – WizKid
    Commented Jun 3, 2014 at 5:09
  • well i had my doubts too. So i tried that too since I am new to this but nope didn't work. It doesn't give any error though. It just doesn't return anything Commented Jun 3, 2014 at 5:14
  • You need to remove the , ["user_friends"] part
    – Tobi
    Commented Jun 5, 2014 at 7:33
  • I have already tried that like I said in my above comment. It doesn't return any error or anything else if I do that Commented Jun 5, 2014 at 8:00

1 Answer 1

0

I had used the below code to get the user's invitable friends.See if this helps : facebookConnectPlugin.api('/me/friends?fields=id,name,picture',["public_profile","user_friends"],

Not the answer you're looking for? Browse other questions tagged or ask your own question.