javascript - Facebook Graph API Returning Empty Data -


i tring facebook friend list getting response null. using javascript sdk. addition in summary getting friend's number. not getting there data.

here code:-

fb.init({     appid      : '{app-id}',     cookie     : true,  // enable cookies allow server access      xfbml      : true,  // parse social plugins on page     version    : 'v1.0' // use version 2.2 }); function testapi() {     fb.login(function(response){         fb.api("/me/friends", function (response) {              console.log(response);         });     },{scope: 'user_friends'}); //  fb.api('/me/feed', 'post', {message: 'hello, world!'}, function(){         //  console.log(response); //  }); }  <fb:login-button scope="public_profile,user_friends" onlogin="checkloginstate();" data-auto-logout-link="true"></fb:login-button> 

can tell me, making mistake?

did fb.init() correctly ?

did add correct permissions app in developer.facebook page ?

then miss informations fields want in friends list , scope:

     fb.login(function(response) {        if (response.authresponse) {             fb.api('/me/friends', {fields: 'xxxxx'}, function(response) {                console.log(response);             });         } else         {             console.log('authorization failed.');         }      },{scope: 'friends'}); 

Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -