获取页面的 APP_SECRET,而不是应用程序?
现在我正在执行一个 http post 请求,将 Coldfusion 文件直接发布到我的 Facebook 页面。现在,它可以使用页面的正常 ACCESS_TOKEN 完全正常工作。我的问题是,为了延长 ACCESS_TOKEN 的寿命,我需要一个 APP_SECRET,但我不知道如何为页面获取它。有什么建议吗?我真的希望这是可能的。
Right now I am doing an http post request to post from a coldfusion file straight to my Facebook page. Right now, it is fully functional with the normal ACCESS_TOKEN for the page. My problem is, that to extend the life of the ACCESS_TOKEN, I need an APP_SECRET, which I don't know how to get for a page. Any tips? I really hope it's possible.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
提示 1:页面不存在应用程序机密之类的东西。
提示 2:应用程序机密适用于应用程序。
什么类型的访问令牌是“正常”的?你是怎么得到它的?
阅读 http://developers.facebook.com/docs/authentication/ 有关如何正确获取 PAGE 访问令牌的更多信息。
Tip 1: There is no such thing as an app secret for a page.
Tip 2: App secrets are for apps.
What type of access token is "normal"? How did you get it?
Read the "Page login" part of http://developers.facebook.com/docs/authentication/ for more information on how to correctly get a PAGE access token.
如果您想通过页面获取/发布/删除内容,则需要管理员用户的访问令牌和管理页面权限,然后为您想要通过应用程序“管理”的每个页面获取访问令牌,这似乎您之前必须已经完成,才能首先获得访问权限。
据我所知,只要您的用户访问令牌仍然是最新的,再次获取该页面信息就会刷新页面访问令牌。我建议重新使用原始调用的代码来获取页面数据/访问令牌。
If you want to GET/POST/DELETE things via pages, you need a admin user's access token and the manage pages permissions, and then get an access token for each of the pages you want to 'manage' through the application, which it seems you must have previously done, to have access in the first place.
As far as I know, getting that page information again, would refresh a page access token, as long as your user access token was still up to date. I'd suggest re-using the code you have for the original call to get the page data/access tokens.