2012-04-05 110 views
16

爲了研究目的,我需要獲得歐盟委員會Facebook頁面的所有貼子。我嘗試過這個鏈接,但我無法訪問:http://graph.facebook.com/EuropeanCommission/posts如何查看/獲取特定Facebook頁面的所有貼子

我有沒有機會獲得委員會發布的所有帖子的列表?或者我需要從時間表中手動複製並粘貼它們?評論是不需要的。

+0

如果您是複製粘貼,不要使用時間軸,而不是將「/ allactivity」附加到頁面URL。這實際上會顯示所有帖子,而不是通過EdgeRank過濾的時間軸。 – yoyo 2013-11-11 05:57:21

回答

24

我只是試圖在API Explorer工具和我有分頁鏈接帖子列表太:

http://developers.facebook.com/tools/explorer?method=GET&path=EuropeanCommission%2Fposts

{ 
    "data": [ 
    { 
     "id": "107898832590939_396059463745799", 
     "from": { 
     "name": "European Commission", 
     "category": "Government organization", 
     "id": "107898832590939" 
     }, 
     "picture": "http://photos-f.ak.fbcdn.net/hphotos-ak-prn1/523856_348222705225216_107898832590939_963377_101027267_s.jpg", 
     "link": "http://www.facebook.com/notes/european-commission/news-update-2-4-march-2012-by-elections-myanmar-conviasa-added-to-eu-blacklist-v/396059463745799", 
     "name": "News update 2-4 March 2012: By-elections Myanmar, Conviasa added to EU blacklist, vehicle registration easier and more.", 
     "description": "\nMonday 2 April: Catherine Ashton congratulates the Government and people of Myanmar on the conduct of the by-elections\n \n\nMyanmar – Pagodas in Bagan\n \n...", 
     "icon": "http://static.ak.fbcdn.net/rsrc.php/v1/yY/r/1gBp2bDGEuh.gif", 
     "actions": [ 
     { 
      "name": "Comment", 
      "link": "http://www.facebook.com/107898832590939/posts/396059463745799" 
     }, 
     { 
      "name": "Like", 
      "link": "http://www.facebook.com/107898832590939/posts/396059463745799" 
     } 
     ], 
     "type": "link", 
     "application": { 
     "name": "Notes", 
     "id": "2347471856" 
     }, 
     "created_time": "2012-04-04T13:06:58+0000", 
     "updated_time": "2012-04-05T07:54:16+0000", 
     "likes": { 
     "data": [ 
      { 
      "name": "EU Law and Publications", 
      "category": "Media/news/publishing", 
      "id": "218434258171162" 
      } 
     ], 
     "count": 1 
     }, 
     "comments": { 
     "data": [ 
      { 
      "id": "107898832590939_396059463745799_5180327", 
      "from": { 
       "name": "Ivan Burrows", 
       "id": "1119361344" 
      }, 
      "message": "@ The European Parliament\n\nWhen do we get ours?\n\nIt seems you have finally managed to get an increase in something.\n\n40\u0025 increase in suicides in Greece.\n\nTheir blood is on your hands.\n\nhttp://www.bbc.co.uk/news/world-europe-17621131", 
      "created_time": "2012-04-05T07:54:16+0000" 
      } 
     ], 
     "count": 1 
     } 
    }, 
    { 
     "id": "107898832590939_424622557555230", 
     "from": { 
     "name": "European Commission", 
     "category": "Government organization", 
     "id": "107898832590939" 
     }, 
     "message": "Marie Therese Vella gets a fresh start thanks to ESF-funded training for people over 40. Have a look at how she did it. Are you planning a career change? Are you currently unemployed? Are you aware of the channels available to you to get help? http://bit.ly/HVaLXZ", 
     "picture": "http://external.ak.fbcdn.net/safe_image.php?d=AQBVJqYwG1_uazFM&w=90&h=90&url=http\u00253A\u00252F\u00252Fec.europa.eu\u00252Fesf\u00252FBlobServlet\u00253Fmode\u00253DvideoPhoto\u002526videoId\u00253D2491\u002526cnt\u00253D313333967", 
     "link": "http://bit.ly/HVaLXZ", 
     "name": "Funding - Getting a fresh start", 
     "caption": "ec.europa.eu", 
     "icon": "http://static.ak.fbcdn.net/rsrc.php/v1/yD/r/aS8ecmYRys0.gif", 
     "actions": [ 
     { 
      "name": "Comment", 
      "link": "http://www.facebook.com/107898832590939/posts/424622557555230" 
     }, 
     { 
      "name": "Like", 
      "link": "http://www.facebook.com/107898832590939/posts/424622557555230" 
     } 
     ], 
     "type": "link", 
     "created_time": "2012-04-04T11:32:32+0000", 
     "updated_time": "2012-04-04T12:24:45+0000", 
     "shares": { 
     "count": 11 
     }, 
     "likes": { 
     "data": [ 
      { 
      "name": "Stefanija Stoimenovska", 
      "id": "100000025178728" 
      } 
     ], 
     "count": 28 
     }, 
     "comments": { 
     "data": [ 
      { 
      "id": "107898832590939_424622557555230_5762457", 
      "from": { 
       "name": "Ehtesham Mallick", 
       "id": "100001067328472" 
      }, 
      "message": "I wish some training in Laws especially from European countries and prefer training and distance learning about Human rights under the chartered of UNO", 
      "created_time": "2012-04-04T12:24:45+0000" 
      } 
     ], 
     "count": 1 
     } 
    } 
    ], 
    "paging": { 
    "previous": "https://graph.facebook.com/EuropeanCommission/posts?limit=2&format=json&since=1333544818&__previous=1", 
    "next": "https://graph.facebook.com/EuropeanCommission/posts?limit=2&format=json&until=1333539151" 
    } 
} 
+1

非常感謝。它也適用於我。但問題是我只能在2012年3月29日前發佈帖子(請參閱我的截圖[鏈接](http://kickhiv.de/api.jpg)。自2010年歐盟委員會在Facebook上發佈帖子以來,我需要所有帖子。任何想法如何讓他們全部? 而另一個問題:API瀏覽器是否只顯示代碼或Facebook頁面? 非常感謝您的幫助! – user1315129 2012-04-12 10:55:46

+2

下面是一個使用分頁的例子:'EuropeanCommission/posts?format = json&limit = 25&until = 1330440566'您將獲得2012年2月6日至2012年2月28日的所有項目請將第二個問題作爲一個新的Stackoverflow問題提問謝謝 – DMCS 2012-04-12 18:06:56

+0

它只給我兩個標籤消息並創建。沒有圖片,沒有故事,沒有關於我沒有別的。我有範圍\t'user_birthday','user_about_me','email','public_profile' – ImranNaqvi 2016-01-01 07:38:02

相關問題