Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Facebook friend list

$
0
0

I am using alloy to create app viewing facebook friend list . I reached to total count of them but i can not read names and pics . Any idea about that . Thanks.

$.win.open();
 
 var fb = require('facebook');
 
 fb.appid = 735109639933651;
 fb.permissions = ["read_stream", "email","user_friends","read_custom_friendlists"]; 
 fb.addEventListener('login', function(e) {
    if (e.success) {
        alert('Logged in');
    }
});
fb.addEventListener('logout', function(e) {
    alert('Logged out');
});
 
// add the button.  Note that it doesn't need a click event or anything.
$.win.add(fb.createLoginButton({
        top : 10,
 
        style : 'wide'
    }));
 
// graph call
function sync (e){
fb.requestWithGraphPath('me/friends', {}, 'GET', function(e) {
    if (e.success) {
        alert(e.result);
        console.log(JSON.stringify(e));
    } else if (e.error) {
        alert(e.error);
    } else {
        alert('Unknown response');
    }
});
 
}

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>