简体   繁体   English

获取所有Facebook页面墙的帖子和评论?

[英]Getting all facebook page wall posts and comments?

I am developing a social media monitoring application. 我正在开发社交媒体监控应用程序。 Currently, we are entering Facebook page ids into the application to collect data from possible customers' Facebook walls (so we have a realistic sample for the customer for direct promotion). 当前,我们正在应用程序中输入Facebook页面ID,以从可能的客户的Facebook墙中收集数据(因此我们为客户提供了一个现实的示例,可以直接进行促销)。 These page ids are used to collect wall postings and comments and to compute statistics (eg to show most used words), and are presented to the user in a special view. 这些页面ID用于收集墙贴和评论以及计算统计信息(例如,显示最常用的单词),并以特殊视图显示给用户。 Requirements are to collect all postings and comments without exception in near-live time. 要求是在近乎实时的时间内收集所有帖子和评论。 We currently have about 130 page ids in the system, with more to come. 目前,系统中大约有130个页面ID,并且还会有更多。

Right now, I am using the Graph API for this, with several disadvantages: 现在,我为此使用了Graph API ,但有几个缺点:

  • FB API access is restricted to 600 request/10 minutes. FB API访问限制为600个请求/ 10分钟。 To get a near-live view, I need to access the API at least each two hours. 要获得近乎实时的视图,我需要至少每两个小时访问一次API。 As we are using API requests in other parts of the program, too, it is obvious that the limit is hit sooner or later (actually, this already happens) 当我们也在程序的其他部分中使用API​​请求时,很明显迟早会达到限制(实际上,这已经发生了)

  • The responses are mostly redundant: to receive current comments, I have to request the wall postings (comments are enclosed in postings) with the URL http://graph.facebook.com/NAME/feed ... 答复大部分是多余的:要接收当前评论,我必须请求URL为http://graph.facebook.com/NAME/feed的留言墙(留言随附在留言中)...

  • The probability for hitting the limits is dependent on the number of postings on the several walls 达到极限的可能性取决于几堵墙上的张贴数量

  • I cannot get all comments with this method (eg comments on postings some time ago) 我无法使用此方法获得所有评论(例如,一段时间前对发布的评论)

I am currently trying out how to switch to (or to complement Graph API usage) using FQL by querying the stream and the comment tables but this also has limitations: 我目前正在尝试通过查询streamcomment表来使用FQL切换到(或补充Graph API的用法),但这也有局限性:

  • I cannot restrict my query to a specific timespan, leading to redundancy again 我无法将查询限制在特定的时间范围内,从而再次导致冗余

  • The max number of posts I am getting for each one of my 130 page ids is 61 - (why 61?) 我的130个页面ID中的每一个所获得的最大帖子数是61-(为什么61?)

  • I need an unpredictable number of additional requests because I need to get special objects like videos and links in separate requests. 我需要数量无法预料的其他请求,因为我需要在单独的请求中获取视频和链接之类的特殊对象。

My question now is - if anyone is doing similar things: How did you solve these problems? 我现在的问题是-是否有人在做类似的事情:您是如何解决这些问题的? How do you get a pseudo-live-stream of a larger number (up to, say 1,000) of walls? 您如何获得更多(多达1,000个)墙的伪实时流?

Letting the customer grant extra permissions to us is currently not an option. 目前,不允许客户向我们授予额外的权限。

you will probably have to meet with FaceBook and work out a contractual deal for greater access to their data. 您可能必须与FaceBook会面并达成合同协议,以更好地访问他们的数据。 I would bet that the answer will be no, no and no, seeing as it appears you are trying to monetize their data, and furthermore, do so without the explicit permission of the users, but hey give it a shot. 我敢打赌,答案是肯定的,因为您似乎正在尝试通过他们的数据获利,而且,在没有用户明确许可的情况下也要这样做,但是请稍作尝试。

I have a similar task - By default FB return only last ~50 posts or all in last 30 days(whichever is smaller) in FQL you should use created_time filter to receive more results. 我有一个类似的任务-默认情况下,FB仅返回FQL中的最后〜50个帖子或最近30天中的所有帖子(以较小者为准),您应该使用created_time过滤器接收更多结果。 my current problem is that via FQL I receive no more than ~500 posts from any FB page wall even when LIMIT increased: 我当前的问题是,即使LIMIT增加,通过FQL,我从任何FB页面收到的帖子也不会超过500个:

'select post_id from stream where source_id = 40796308305 and created_time <'.time().' LIMIT 1000000 ;'

this FQL request to CocaCola FB Page returns now ~300 posts only (less than 2 day posts). 此对CocaCola FB Page的FQL请求现在仅返回约300个帖子(少于2天的帖子)。

If you find a better solution pls advise :) 如果您找到更好的解决方案,请咨询:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM