facebook - Should I pass access token when using FB.api()? -


i'm little confused how pass access token fb.api() when making requests protected things.

i'm getting app login , authenticate fine, how use fb.api() access token have?

app.accesstoken = response.authresponse.accesstoken; // valid access token.  fb.api('/me/friends?access_token='+app.accesstoken, {fields: 'name,id,location,picture,installed'}, function(response) {     console.log(response); }); 

is correct way pass in access token fb.api()?

in case, response comes friends name,id,location,picture doesn't seem have 'installed' data protected.

am doing right?

you not need pass token, if user logged in (with fb.login, example). in fact, using javascript sdk (or php sdk), never need deal (user) access tokens.

so, call this:

fb.api('/me/friends', function(response) {    console.log(response); }); 

getting info if user installed app:


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -