Get Facebook fan page-id in page tab app using javascript

前端 未结 2 1891
别跟我提以往
别跟我提以往 2020-12-12 06:09

Can I get Facebook fan page-id in page tab app without authorizing user using javascript? And also if I authorized user and after that I get signed_reques

相关标签:
2条回答
  • 2020-12-12 06:26

    No, you can not.

    The page info is send only in the signed_request that gets POSTed to your app so with JavaScript, you have no access to POST data. But you can easily access with server side language.

    You might found a lots of PHP code for it..for C# you can use below code..

    string signedR = Request["signed_request"];
    

    I hope this might be helpful to you...@Mirant

    0 讨论(0)
  • 2020-12-12 06:44

    Can I get Facebook fan page-id in page tab app […] using javascript?

    No, you can not.

    The page info is send only in the signed_request that gets POSTed to your app on initial load into the iframe – and with JavaScript, you have no access to POST data.

    The signed_request you get from the JavaScript SDK is a “different one”, it contains info about the auth status and user only, not about the page.

    I want to add Page tab app similar to Pinterest Page App, which initially get UserId/UserName and after that if we open that app then it will directly open according to inserted UserId/UserName.

    I don’t understand what you mean by that exactly. And I don’t see what this has to do with the page id, when you are only speaking of the user id/user name here?

    0 讨论(0)
提交回复
热议问题