使用 javascript 在页面选项卡应用程序中获取 Facebook 粉丝页面 ID [英] Get Facebook fan page-id in page tab app using javascript
问题描述
我可以在页面标签应用程序中获取 Facebook 粉丝 page-id
而不使用 javascript 授权用户吗?而且,如果我授权用户,然后我得到 signed_request
只包含
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_request
which only contains
["algorithm","code","issued_at","user_id"] not "page" object. How can I get "page" object?
我想添加类似于 Pinterest Page App 的 Page tab 应用程序,它最初获得 UserId
/UserName
,然后如果我们打开它app然后它会根据插入的UserId
/UserName
直接打开.
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
.
推荐答案
不,你不能.
页面信息仅在已发布到您的应用程序的 signed_request 中发送,因此使用 JavaScript,您无权访问 POST 数据.但是您可以使用服务器端语言轻松访问.
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.
您可能会找到很多 PHP 代码.对于 C#,您可以使用以下代码..
You might found a lots of PHP code for it..for C# you can use below code..
string signedR = Request["signed_request"];
我希望这对你有帮助...@Mirant
I hope this might be helpful to you...@Mirant
这篇关于使用 javascript 在页面选项卡应用程序中获取 Facebook 粉丝页面 ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!