2016-08-24 3 views
0

아이디어는 참가자가 내 사이트에 사진을 게시하고 "FB Likes"버튼을 사용하여 투표를받는 경연 대회입니다.Facebook 총계 좋아요 수

내 사이트의 게시 URL로 "FB Likes"를 받고 싶지만 더 이상 이전 URL 방식으로는 작동하지 않으며 공유 만 반환합니다.

새로운 API로 테스트 중이지만 "좋아요"또는 "반응"을 얻지 못하면 다음과 같은 오류가 발생합니다.

{ 
    "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

가능한 복제 [가져 오기 페이스 북 공유 /의/댓글 수 등 URL] (http://stackoverflow.com/questions/39028734/get-facebook-share-like-comment-count-of-url) – dim

답변

0

다음 요청에 의해 좋아하는/재 게시/댓글 수를 얻을 수 있도록이 솔루션을 시도해보십시오

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 **는 아무 것도 반환하지 않습니다. 왜 표시합니까? ** 홈 ** [링크] (https://graph.facebook.com/?fields=og_object {likes.limit (0) .summary (true)}, share & ids = http : //www.lagaceta. com.ar/) ** ** ** [링크] (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

관련 문제