使用 FB 的 API 通过我的 Facebook 应用程序获取墙贴
我制作了一个 Facebook 应用程序,人们用它来分享从我的网页到他们的墙的链接,现在我需要取回一段时间内(例如从 9 月 4 日到 9 月 10 日)通过它发布的帖子列表,包括他们的帖子 ID。
我知道我可以在信息发布时保存该信息,但我需要一些我没有以这种方式保存的旧数据。
我尝试过使用 FQL,但这需要指示 source_id(帖子所在的用户墙的 Facebook ID),但我无法知道。
我的应用程序的 Graph API 对象似乎也没有帮助,因为它没有与通过它发布的帖子的连接。
任何帮助都会非常感激,即使只是一个正确方向的标志。
I made a Facebook Application that people use to share links from my webpage to their walls, and now I need to get back a list of the posts made through it during a pediod of time (e.g. from Sep. 4th to Sep. 10th), incluiding their Post IDs.
I am aware that I could save that information at the moment of its publication, but I need some old data that I didn't save that way.
I have tried using FQL, but that requieres to indicate the source_id (Facebook ID of the user's wall where the post is on), which I am not able to know.
The Graph API object for my application doesn't seem to help either, since it doesn't have a connection for the posts made through it.
Any help would be really apreciated, even just a sign in the right direction.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
按照建议,提示用户提供 read_stream 权限,然后我建议采用
fql
路线:这不太可能成为问题,但请注意返回的项目数量有限制,因此,如果您的时间跨度很宽并且您的用户发布了很多内容,您可能需要多使用
[until]
和[since]
并进行多次调用检索所有内容。另请参阅文档,了解有关您可以查询的字段的更多信息:http:// Developers.facebook.com/docs/reference/fql/stream/
As suggested, prompt the user for read_stream permissions, and then I'd suggest to take the
fql
route:It's not likely to be an issue, but be aware that there's a limit in the number of items returned, so if your time span is wide and your users posted a lot, you may have to play with the
[until]
and[since]
a bit more and make several calls to retrieve everything.Also take a look at the documentation for more information about fields you can query: http://developers.facebook.com/docs/reference/fql/stream/
提示用户提供 read_stream 权限,然后查询 /me/statuses 并查找应用程序中的更新。
Prompt the user for read_stream permissions and then query /me/statuses and look for updates from your application.