Graph Facebook APIを使用して、特定のキーワードに関連するすべての公開コンテンツを検索しようとしています。FacebookソーシャルグラフAPI検索を使用してコメント数とコメント数を調べる方法は?
https://graph.facebook.com/search?q=obama&type=post
私は期待どおりの結果を得ましたが、最近、特定の結果に関するコメント数と個々のコメントのリストも検索したいと思います。
これは、上記のAPI呼び出しの出力例です:
{
"id": "1372608125_2297171713409",
"from": {
"name": "xxxx",
"id": "1372608125"
},
"message": "Originaly posted by:Anthony McMahan\n\n Political breakdown time....\n \nToday is short one, here is some information that will floor you if you werent aware of it yet. The United States of America makes approximately 15 trillion dollars annually GDP. Our debt has recently tipped over 15 trillion in recent days. So we now owe more than we make in a year. \n\nTo further add to the fury, medical facilities in the USA account for 1/6 of our GDP, so about 2.5 trillion dollars are brought in from hospitals across the US. the new healthcare bill is a stretch for the givernment to take control of all medical facilities in the US, which would basically cancel out 1/6 of our income as the healthcare would be made available to everyone. Therefore in light of the US being in more debt than we could make in a year, the plan is to take away 1/6 of our ability to make money. Imagine being in credit card debt and having to take a pay cut at work, because you chose to work in the mailroom instead of a cubicle. thats what is going on here in allegory. i would just like to take this time to say, \"thank you mr obama for making this country a laughing stock in the eyes of all our enemies and foreign nations, you'd make Karl Marx and Vladimir Lenin all too proud.\" \n\nUntil tomorrow........",
"type": "status",
"created_time": "2011-12-15T06:02:51+0000",
"updated_time": "2011-12-15T06:02:51+0000"
}
は、私がコメントやそのポストに関連するコメントのリストの番号を見つけたいとします。別のAPI呼び出しを使用する必要がありますか?
別のAPIを呼び出すことなく、「Graph API search」内のコメントの数を直接知ることはできますか?投稿にコメントがある場合はコメントのリストを取得するために別のAPIを実行します。そうでなければ追加のAPI呼び出しを実行する必要はありません。
私は、次のAPI呼び出しを実行する必要があり、個々のコメントの一覧を取得するために知っているように:
http://graph.facebook.com/1372608125_2297171713409/comments
は正しい方法がそうすることですか?ここでは、その投稿に実際にコメントがあるかどうかは手がかりも得られません。
私は実際のGoogle+のAPIがどこつの検索API呼び出し内で、私は次のような回答(コメント)の数を取得することができているのと同様の機能を得ることを期待している:
"replies": {
"totalItems": 53,
"selfLink": "https://www.googleapis.com/plus/v1/activities/z13rhfhjzzm4ztrnt22kwpgglsrjdfra504/comments"
},
今、私はこれが検索結果からコメントを得る唯一の方法だと確信しています。 FBは検索結果から直接コメントを表示するオプションを削除したようだ。このAPIコールは動作します:https://graph.facebook.com/search?q=watermelon&type=post&fields=comments,message –