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

前端 未结 2 1908
别跟我提以往
别跟我提以往 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: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?

提交回复
热议问题