20

Facebook の opengraph API を使用して、特定の投稿に対するコメントやいいねを取得しようとしています。一部の情報は返ってきますが、投稿に記載されているコメントやいいねの数と常に一致するとは限りません。これは、使用しているトークンのアクセス許可に起因する可能性があると思います。ただし、使用するリクエスト制限によって結果が異なることに気付きました。また、リクエスト間でエントリが重複することもあります。

For example, post 10376464573_150423345118848 has about 14000 likes as of this writing, but I can only retrieve a maximum of around 5000. With the default limit of 25 I can get up to 3021 likes. A value of 100 gives 4501, while limits of 1000, 2000, 3000 and 5000 all return the same number of likes, 4959 (the absolute values don't make too much sense of course, they are just there for comparison).

I have noticed similar results on a smaller scale for comments.

I'm using a simple python script to fetch pages. It goes through the data following the pagination links provided by Facebook, writing each page retrieved to a separate file. Once an empty reply is encountered it stops.

小さい制限 (たとえば、デフォルトの 25) では、返される結果の数が、ページネーション リンクをたどるにつれて単調に減少していることに気付きました。これは非常に奇妙に思えます。

この動作の原因とその回避方法について何か考えはありますか?

4

2 に答える 2