[英]Facebook graphApi oAuth - how to get access token?
I'm trying to get wall posts from a certain user using the JavaScript Facebook SDK. 我正在尝试使用JavaScript Facebook SDK从某个用户获取墙上帖子。 When I use the graph API Explorer, it works fine;
当我使用图形API资源管理器时,它工作正常; but when I try the same thing on my website, I get the following error:
但是当我在我的网站上尝试同样的事情时,我收到以下错误:
code: 104
message: "An access token is required to request this resource."
type: "OAuthException"
Where can I find my access token, so that I can show my company's Facebook page stream on my website? 我在哪里可以找到我的访问令牌,以便我可以在我的网站上显示我公司的Facebook页面流?
Yes, you need an Access Token to fetch posts made by a Facebook Page. 是的,您需要一个访问令牌来获取Facebook页面发布的帖子。 As the page posts are public, any access token will work.
由于页面帖子是公开的,任何访问令牌都可以使用。 You should use an app access token as it
never expires
. 您应该使用应用程序访问令牌,因为它
never expires
。
App Token
. App Token
。 Make calls to the graph API to fetch page posts 调用图API来获取页面帖子
https://graph.facebook.com/pageID/feed?access_token=your_token
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.