2016-08-24 17 views
0

です。参加者が自分の写真を自分のサイトに公開し、「FB Likes」ボタンを使って投票を受けるコンテストです。Facebookからの総数は

自分のサイトの公開URLで「FB Likes」を取得したいが、古いURLメソッドでは機能しなくなりましたが、共有のみが返されます。

新しいAPIでテストしていますが、「Likes」または「Reactions」が表示されず、次のエラーが表示されます。

{ 
    "error": { 
    "message": "(#12) singular links API is deprecated for versions v2.4 and higher", 
     "type": "OAuthException", 
     "code": 12, 
     "fbtrace_id": "EtqLBMRNwZK" 
    } 
} 

このリンクに記載されている解決策を試してみてくださいが、データを取得できません。

Getting Facebook Reactions with Graph API

よろしく。ありがとう!

+0

可能な重複[ゲットFacebookのシェア/の/コメント数などのURL](http://stackoverflow.com/questions/39028734/get-facebook-share-like-comment-count-of-url) – dim

答えて

0

次の要求により、好き/ reposts /コメントの数を取得できるように、このソリューションをお試しください:

https://graph.facebook.com/?fields=og_object{likes.limit(0).summary(true)},share&ids=http://google.com,http://stackoverflow.com/ 

応答:

{ 
    http://google.com: { 
    og_object: { 
     likes: { 
     data: [ ], 
     summary: { 
      total_count: 88216 
     } 
     }, 
     id: "381702034999" 
    }, 
    share: { 
     comment_count: 0, 
     share_count: 36084403 
    }, 
    id: "http://google.com" 
    }, 

    http://stackoverflow.com/: { 
    og_object: { 
     likes: { 
     data: [ ], 
     summary: { 
      total_count: 660 
     } 
     }, 
     id: "10150180465825637" 
    }, 
    share: { 
     comment_count: 12, 
     share_count: 45367 
    }, 
    id: "http://stackoverflow.com/" 
    } 
} 
+0

あなたのURLが動作します! しかし、HOMEだけなので、 2つのリンク、** HOME **と** NOTE **、** NOTE **は何も表示しません。なぜですか? ** HOME ** [link](https://graph.facebook.com/?fields=og_object {likes.limit(0).summary(true)}、share&ids = http://www.lagaceta。 com.ar/) **注** [link](https://graph.facebook.com/?fields=og_object {likes.limit(0).summary(true)}、share&ids = http:/ /www.lagaceta.com.ar/nota/695810/sociedad/supermercado-indemnizara-clienta-identifico-com-gluteos-grandes.html?utm_source=facebook.com&utm_medium=social&utm_campaign=fanpagetucuman) ありがとうございます! – MWDS

関連する問題