Quantcast
Viewing all articles
Browse latest Browse all 8068

Problem getting list of facebookfriends iOS

I am trying to get a list of the user's Facebook friends but I can't get it right

Here is my code for trying to see it in an alert:

var fb = require('facebook');
 fb.appid = 'MY_APP_ID';
 fb.permissions = ["user_friends"];
 
 
fb.requestWithGraphPath('me/friends', {}, 'GET', function(e) {
    if (e.success) {
        alert(e.result); //This gives me a very big/large alertdialog that is empty
         fbData = JSON.parse(e.result);
        alert(fbData); //This gives me the same alert
 
    } else if (e.error) {
        alert(e.error);
    } else {
        alert('Unknown response');
    }
});
if I try only getting information about "me" it works. What is wrong with the code? Please help me.

I am using titanium version 3.2 and iOS7


Viewing all articles
Browse latest Browse all 8068

Trending Articles