0

I'm using a facebook extension in TYPO3 to pull out the facebook posts of a page. Therefor I need the accesstoken. I googled around and found that I need a facebook app and I need to be administrator of the page.

Then I heard that I need to connet the app with the site, but how can I do this?

I also tried to get accesstoken:

https://graph.facebook.com/oauth/access_token?client_id=APP_ID&client_secret=APP_SECRET&grant_type=client_credentials

And then performing:

https://graph.facebook.com/oauth/access_token?grant_type=fb_exchange_token& client_id={app-id}&client_secret={app-secret}&fb_exchange_token={short-lived-token}

... with this token but it says No user access token specified

Can someone help me step by step how to get the long lived token?

4

3 回答 3

1

因为你只是想拉,你真的不需要页面访问令牌。除非您对您的页面有人口统计或其他限制。所有页面都是公开的,并且可以使用简单的应用访问令牌轻松访问它们上的数据

Your_App_ID|Your_App_Secret
于 2013-05-15T05:51:36.403 回答
0

这是我的实现(PHP):

$newposts = json_decode(file_get_contents("https://graph.facebook.com/YOURFBPAGE/feed&access_token=YOURAPPID|YOURAPPSECRET"));

因为我只是用它来对我的提要帖子进行简单的拉取请求,所以这是最好的方法。您不必处理过期的访问令牌。只需创建您的 Facebook 应用程序并获取 ID 和密码。

于 2013-11-18T19:23:17.417 回答
0

首先你需要从 facebook 获取一个 API 密钥,所以这里是步骤--->

http://www.shoutmeloud.com/how-to-acquire-your-facebook-api-key.html

& 然后你可以访问 facebook API,这些是 facebook 提供的使用该 API 的文档--->

https://developers.facebook.com/docs/guides/web/

于 2013-05-15T05:38:31.977 回答