簡體   English   中英

Graph API如何獲取Facebook頁面成員/喜歡

[英]Graph API how get facebook page members/likes

在此處輸入圖片說明 Facebook喜歡支票

我找到了一個有趣的應用程序。 這個fb-app可以從任何粉絲頁面獲得所有贊,並按質量和國家/地區對它進行排序!

我的問題:

這些應用程序如何從圖api獲取數據?

第一:獲取fanpage對象,無需訪問令牌

https://graph.facebook.com/cocacola/

{
   "about": "The Coca-Cola Facebook Page is a collection of your stories showing how people from around the world have helped make Coke into what it is today.",
   "checkins": 146,
   "description": "Created in 1886 in Atlanta, Georgia, by Dr. John S. Pemberton, Coca-Cola was first offered as a fountain beverage at Jacob's Pharmacy by mixing Coca-Cola syrup with carbonated water. \n\nCoca-Cola was patented in 1887, registered as a trademark in 1893 and by 1895 it was being sold in every state and territory in the United States. In 1899, The Coca-Cola Company began franchised bottling operations in the United States. \n\nCoca-Cola might owe its origins to the United States, but its popularity has made it truly universal. Today, you can find Coca-Cola in virtually every part of the world.\n\nCoca-Cola Page House Rules: http://CokeURL.com/q28a",
   "founded": "1886",
   "is_published": true,
   "location": {
      "street": "",
      "zip": "",
      "latitude": 48.886763644968,
      "longitude": 2.2428464993582
      },
  "talking_about_count": 903212,
  "username": "coca-cola",
  "website": "http://www.coca-cola.com",
  "were_here_count": 0,
  "category": "Food/beverages",
  "id": "40796308305",
  "name": "Coca-Cola",
  "link": "https://www.facebook.com/coca-cola",
  "likes": 58345623, 
  "cover": {
     "cover_id": "10152037156953306",
     "source": "http://sphotos-b.ak.fbcdn.net/hphotos-ak-ash4/s720x720/602289_10152037156953306_1443207674_n.jpg",
     "offset_y": 0
  }
}

第二 :從facebook對象中獲得贊:

https://graph.facebook.com/cocacola/likes?access_token=xxxxxxx

現在我將收到所有喜歡“可口可樂”的粉絲頁面,但我需要所有喜歡可口可樂的用戶!

Maby只能用FQL查詢嗎?

使用FB 2.6 API,您可以通過fan_count字段獲得全部fan_count

http://graph.facebook.com/cocacola/?fields=fan_count&access_token= {value}

Facebook不會為您提供喜歡頁面的用戶列表。 您無需此即可創建此應用。 您可以通過查詢公開可用的見解數據來獲取此數據。

此URL將為您提供該應用程序用來創建此圖的原始數據:

https://graph.facebook.com/cocacola/insights/page_fans_country?access_token=XXXXXX

您可以使用任何有效的access_token獲取此信息。

https://graph.facebook.com/cocacola/?fields=fan_count&access_token=#######

您可以使用fan_count字段獲得喜歡的Facebook頁面成員。 但是您必須傳遞頁面訪問令牌,而不是用戶access_token。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM