1

I am using Facebook JS sdk to show news feeds. the app works well for many users for for some users who have authorized my app doesn't bring reasonable result.

I use following code to get basic profile info which works for some users but for some it doesn't:

FB.api('/' + id + '?access_token=' + access_token, function (response) {
    var strTitle = response['first_name'] + "  " + response['last_name'];
});

In response object I receive only id, birth date, email, profile link but name is not available. Interestingly when I open profile link in my browser facebook says:

"Sorry, this page isn't available The link you followed may be broken, or the page may have been removed."

after that my code can bring its posts but again the from name of the posts is missing in response object. The permissions list is attached as picture.Permissions list

I can't understand what is going on and how can i fix this issue. Any help please?

4

1 回答 1

0

The problem is that you are using the App center permissions feature (previously known for Authenticated referrals).

Use these settings to enter the set of permissions your app requires when displayed in App Center

You should be passing a login url with the scope array of permissions in JS SDK.

FB.login(function(response) {
   // handle the response
 }, {scope: 'email,user_likes'});

or via a login button

<div class="fb-login-button" scope="email,user_likes" data-show-faces="true" data-max-rows="3">Login with Facebook</div
于 2013-05-03T00:56:40.027 回答