3

我在頁面上放置的「喜歡」插件顯示該按鈕被直接點擊的次數,以及頁面URL被共享或Like已被評論的次數。你如何得到URL(喜歡和分享)的總喜歡?

當我使用Graph API檢查我的對象時,它只顯示直接「喜歡」點擊次數。下面是一個例子對象:

{ 
    "id": "17678692xxxxxxx", 
    "name": "The Dali Lama Returns", 
    "picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/161984_176786925772923_6855xxxxxxx.jpg", 
    "link": "http://mysite.com/8/the-dali-lama-returns", 
    "likes": 1, 
    "app_id": 478xxxxxxx, 
    "category": "Unknown", 
    "is_published": true, 
    "description": "The Dali Lama will speak, and we will listen.", 
    "about": "The Dali Lama will speak, and we will listen.", 
    "can_post": true 
} 

這意味着有人點擊我的喜歡按鈕後,並寫等的評論,該按鈕,將顯示「2」計數,但我的對象將只顯示一個數。

有沒有辦法讓按鈕在我的頁面上顯示完整的「贊」計數?

+0

可能重複(http://facebook.stackoverflow.com/questions/5699270/how-to-get-share-counts-using- [如何使用圖形API來獲取份額數]圖-API) – ifaour 2012-03-17 11:15:34

回答

11

我發現了兩種方法。利用圖API的新方法看來是是FQL使用,如下面的請求顯示:

https://graph.facebook.com/fql?q=SELECT url, normalized_url, share_count, like_count, comment_count, total_count, commentsbox_count, comments_fbid, click_count FROM link_stat WHERE url='http://mysite.com/8/the-dali-lama-returns' 

舊的方式,其餘API,它處於被棄用的過程:

link.getStats() 

https://developers.facebook.com/docs/reference/rest/links.getStats/

0

我知道後是老&不知道,如果你只問關於如何把櫃檯上,但這裏有兩件事情,你一定能試試。

SharedCount:您可以在線查看統計數據,也可以整合他們的API。但是,它的免費約。 10K API請求一個月。

編輯:你也可以看到這個問題。 https://wordpress.stackexchange.com/questions/133536/display-total-number-of-social-shares

TheBuzzz:您可以在線&收益總份額數從流行的社交媒體網站&測試任何URL也返回莫茲反向鏈接。

希望這有助於的