久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Facebook API:獲得頁面/群組帖子點贊、分享、評論數

Facebook API: best way to get like, share, comment count for a page/group post?(Facebook API:獲得頁面/群組帖子點贊、分享、評論數的最佳方式?)
本文介紹了Facebook API:獲得頁面/群組帖子點贊、分享、評論數的最佳方式?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

獲得帖子點贊、分享和評論數的最佳方式是什么?

What's the best way to get the like, share, comment count for a post?

我正在嘗試通過 FQL,但當 URL 是 FB 帖子 URL 時,它似乎沒有提供任何數據:

I'm trying via FQL but it doesn't seem to give any data when the URL is a FB post URL:

SELECT like_count、comment_count、share_count FROM link_stat WHEREurl="https://www.facebook.com/Macklemore/posts/10153256675935268"

SELECT like_count, comment_count, share_count FROM link_stat WHERE url="https://www.facebook.com/Macklemore/posts/10153256675935268"

當我通過 Graph API Explorer 獲取帖子信息時:

When I get the post info via the Graph API Explorer:

386050065267_10153256675935268

386050065267_10153256675935268

它給我點贊數和分享數,我可以通過386050065267_10153256675935268/comments?summary=true

It gives me the like count and share count and I can get the comment count via 386050065267_10153256675935268/comments?summary=true

{
  "id": "386050065267_10153256675935268", 
  "from": {
    "category": "Musician/band", 
    "name": "Macklemore", 
    "id": "386050065267"
  }, 
  "message": "We’re playing a FREE show in November to celebrate the new Microsoft Store opening in Jacksonville, Florida. Come see us! Info here: http://msft.it/STJevent

Thursday, November 21, 2013
10:00 p.m.
Start lining up for your chance to attend the show on Saturday.
Location: Outdoors behind Oakley, near Dick’s Sporting Goods.", 
  "actions": [
    {
      "name": "Comment", 
      "link": "https://www.facebook.com/386050065267/posts/10153256675935268"
    }, 
    {
      "name": "Like", 
      "link": "https://www.facebook.com/386050065267/posts/10153256675935268"
    }
  ], 
  "privacy": {
    "value": ""
  }, 
  "type": "status", 
  "status_type": "mobile_status_update", 
  "created_time": "2013-09-26T16:30:23+0000", 
  "updated_time": "2013-09-27T20:39:45+0000", 
  **"shares": {
    "count": 274
  },** 
  "likes": {
    "data": [
      {
        "name": "Jabson Ramos", 
        "id": "100005418486411"
      }, 
      {
        "name": "Sophia Belen Parada Andrades", 
        "id": "100002552653152"
      }, 
      {
        "name": "Oli Barrera", 
        "id": "100001718791443"
      }, 
      {
        "name": "Viktoria Martinez", 
        "id": "1697663024"
      }
    ], 
    **"count": 3345**
  }, 
  "comments": {
    "data": [
      {
        "id": "10153256675935268_43537841", 
        "from": {
          "name": "Vu Thai", 
          "id": "1338690172"
        }, 
        "message": "Sean Viray Matt Win Soo... about my birthday weekend...", 
        "message_tags": [
          {
            "id": "75311036", 
            "name": "Sean Viray", 
            "type": "user", 
            "offset": 0, 
            "length": 10
          }, 
          {
            "id": "25113189", 
            "name": "Matt Win", 
            "type": "user", 
            "offset": 11, 
            "length": 8
          }
        ], 
        "can_remove": false, 
        "created_time": "2013-09-26T16:31:03+0000", 
        "like_count": 4, 
        "user_likes": false
      }, 
      .....
    ], 
    "paging": {
      "cursors": {
        "after": "MjY=", 
        "before": "MQ=="
      }, 
      "next": "https://graph.facebook.com/386050065267_10153256675935268/comments?limit=25&after=MjY="
    }
  }
}

奇怪的是,當我在我的應用程序中運行該查詢時,我沒有得到共享計數或喜歡計數.難道我做錯了什么?資源管理器中的數據與應用程序有權訪問的數據不同嗎?

Weird thing is when I run that query in my app I don't get the share count or like count. Am I doing something wrong? Is the data in the explorer different from what apps have access to?

我知道我可以通過 386050065267_10153256675935268/likes?summary=true 獲得點贊數

I know I can get the like count via 386050065267_10153256675935268/likes?summary=true

最大的問題是缺少份額數.

Biggest thing would be the missing share count.

總結一下,

你能通過 FQL 獲得這些統計數據嗎?如果沒有,如何通過Graph API獲取份額數?

Can you get these stats via FQL? If not, how can you obtain the share count via the graph API?

推薦答案

POST_ID?fields=likes.summary(true),comments.summary(true),shares

結果:

{
  "shares": {
    "count": 272            //share count
  }, 
  "likes": {
    "data": [

    ], 
    "paging": {

    }, 
    "summary": {
      "total_count": 3453   //like count
    }
  }, 
  "comments": {
    "data": [

    ], 
    "paging": {

    }, 
    "summary": {
      "total_count": 255    //comment count
    }
  }
}

這篇關于Facebook API:獲得頁面/群組帖子點贊、分享、評論數的最佳方式?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Joining 2 tables in SELECT(MYSQL/PHP)(在 SELECT(MYSQL/PHP) 中加入 2 個表)
How to make lt;option selected=quot;selectedquot;gt; set by MySQL and PHP?(如何使lt;option selected=“selectedgt;由 MySQL 和 PHP 設置?)
Auto populate a select box using an array in PHP(使用 PHP 中的數組自動填充選擇框)
PHP SQL SELECT where like search item with multiple words(PHP SQL SELECT where like search item with multiple words)
json_encode produce JSON_ERROR_UTF8 from MSSQL-SELECT(json_encode 從 MSSQL-SELECT 產生 JSON_ERROR_UTF8)
MySQL ORDER BY rand(), name ASC(MySQL ORDER BY rand(),名稱 ASC)
主站蜘蛛池模板: 久久国产精品久久国产精品 | 一级一级一级毛片 | 欧美中文视频 | 欧美高清视频一区 | 激情黄色在线观看 | 欧美1区 | 中文字幕一区二区三区不卡 | 久久久精品一区 | av在线免费观看网站 | 日韩电影免费在线观看中文字幕 | 偷拍第一页 | 欧美国产日韩一区 | 亚洲精品欧美一区二区三区 | 秋霞电影院午夜伦 | 欧美一区在线视频 | 欧美精品在线一区二区三区 | 黄色毛片在线观看 | 欧美久久一区 | 在线视频 中文字幕 | 欧洲国产精品视频 | 免费啪啪 | 国产伦精品一区二区三区高清 | 天天射影院 | 日本淫视频 | 成人不卡 | 成人精品一区二区 | 国产精品永久免费视频 | 亚洲免费在线 | 中文字幕在线一区二区三区 | 久久久网 | 日日夜夜天天 | 91在线视频一区 | 国产精品国产 | 网站黄色av | 国产中文在线 | 欧美精品一区二区三区视频 | 一二三四在线视频观看社区 | 亚洲国产精选 | 中文字幕亚洲精品 | 国产精品久久久久久久久久 | 亚洲视频精品 |