获取Facebook页面帖子 [英] Getting Facebook Page Posts

查看:100
本文介绍了获取Facebook页面帖子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一些JavaScript,可以在Facebook页面上获取所有的帖子。我这样做的网址是这样的:

  http://graph.facebook.com/cocacola/feed?limit= 5& callback = facebookResponse 

这个工作不错,直到上个星期有一段时间,当我开始看到oauth错误。



我在Stack上搜索了一个小时左右,看到很多其他人都试图这样做,但没有一个被问到在我对FB的所有请求开始返回这些oauth错误之后。



真的没有意义 - 我试图从公司页面访问公开的数据。我仍然可以通过RSS来执行此操作(尽管是有限的)。



无论如何,我希望有人能够告诉我如何获得这个公开可获得的信息,而无需通过获取应用程序ID,授权令牌等的索引。

解决方案

这是一个< a href =https://developers.facebook.com/blog/post/2011/05/27/platform-updates--operation-developer-love/ =nofollow> 最近的不是最近的变化,但是现在需要一个访问令牌来访问 / feed / posts 。烦人,但至少它是可导航的。



编辑:更新了链接,这已经在这个帖子相关多年以来已经破裂。以下是该帖子未来后代的相关文字:


突破变化:Graph API PROFILE_ID / feed PROFILE_ID / posts 需要access_token



Graph API <$页面,应用程序,用户或组以及页面或用户的 PROFILE_ID / posts 的c $ c> PROFILE_ID / feed / 现在将需要vaild [sic] access_token访问相应对象的墙壁或帖子(以前没有access_token需要)。当查询墙上的帖子时,这也会影响流表的直接FQL查询。



您需要传递一个有效的应用程序或用户access_token来访问此功能。如果您在没有访问令牌的情况下调用此API,请更新您的代码。这个变化将从今天到周五(6月3日)的一周内生效。我们已经更新了路线图以反映这一变化。



展望未来,您应该始终传递一个有效的应用程序或用户access_token与所有API请求。



I've written a bit of JavaScript that will fetch all of the posts on a Facebook Page. The URL with which I do that is this:

http://graph.facebook.com/cocacola/feed?limit=5&callback=facebookResponse

and this worked fine and dandy, right up until last week sometime, when I started seeing oauth errors.

I've searched for an hour or so on Stack, and seen plenty of other people are trying to do this, - but none have been asked after all of my requests to FB started returning these oauth errors.

It really doesn't make sense, - I'm trying to access publicly available data from company pages. I can still do so without oauth (albeit in a limited fashion) via RSS.

Anyhow, I'm hoping someone can clue me in as to how to get this PUBLICLY AVAILABLE information without having to go through the rigmarole of getting an application ID, an authorization token, etc.

解决方案

This is a recent not-so-recent change, but you now need an access token to access /feed and /posts. Annoying, but at least it's navigable.

Edit: updated the link, which has broken in the many years since this post was relevant. Here's the relevant text from that post for future posterity:

Breaking change: Graph API PROFILE_ID/feed and PROFILE_ID/posts requires access_token

The Graph API PROFILE_ID/feed/ for a Page, Application, User or Group and PROFILE_ID/posts for a Page or User will now require a vaild [sic] access_token to access the wall or posts of the corresponding object (where previously no access_token was required). This will also affect direct FQL queries to the stream table, when querying for posts on a wall.

You will need to pass a valid app or user access_token to access this functionality. Please update your code if you are calling this API without an access token. This change will go live a week from today - Friday(June 3rd). We have updated the Roadmap to reflect this change.

Moving forward, you should always pass a valid app or user access_token with all API requests.

这篇关于获取Facebook页面帖子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆