facebook - How to retrieve page id from application tab -


i have application tab installed on many pages manage.

i want retrieve id of page signedrequest not contain page_id. why?

this code:

if (response.status === 'connected') {        var uid = response.authresponse.userid;       var accesstoken = response.authresponse.accesstoken;       var signedrequest = response.authresponse.signedrequest;       var data = signedrequest.split('.')[1];       data = json.parse(window.atob(data));     }  

the output of data is:

object {    algorithm="hmac-sha256",   code="aqbqcct1sokkitut_pnwl-gx...na-izqqk6trrsfqiikp8kae",   issued_at=1445942158,   user_id=my_id } 

how can page id? thanks!

the page id in signed_request parameter, , 1 sent server post: https://developers.facebook.com/docs/games/canvas/login#parsingsr

just parse , use var_dump check out fields.

you can use php sdk parameter: https://developers.facebook.com/docs/php/howto/example_access_token_from_page_tab/5.0.0


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -