For research purposes I need to get all wall posts of the European Commission's Facebook page. I tried it trough this link, but I couldn't get access: http://graph.facebook.com/EuropeanCommission/posts
Is there any chance I can get a list of all posts ever published by the Commission? Or do I need to hand-copy-and-paste them from the timeline? Comments are not needed.
I just tried in the API Explorer tool and I got the list of posts with pagination links too:
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"
}
}
Related
I'm using Facebook Graph API to list all comments of posts of my Facebook page by using this call
/v3.1/me?fields=posts{comments{from,message,created_time,comments{from,message,created_time}}}
I am admin of the page and I use Page Access token for API calls.
This is what I get (Blacked out some details for privacy reasons)
{
"posts": {
"data": [
{
"comments": {
"data": [
{
"from": {
"name": "██P1██",
"id": "███6166"
},
"message": "Ich poste als ██P1██",
"created_time": "2018-08-02T08:58:47+0000",
"id": "2021000871244096_2067310823279767"
},
{
"from": {
"name": "██U1██",
"id": "███8640"
},
"message": "Ich poste als ██U1██",
"created_time": "2018-08-02T08:59:33+0000",
"id": "2021000871244096_2067311606613022"
},
{
"from": {
"name": "██P1██",
"id": "███6166"
},
"message": "Host an Schülling für mi?",
"created_time": "2018-08-02T09:00:23+0000",
"id": "2021000871244096_2067312356612947"
},
{
"from": {
"name": "██U2██",
"id": "███4255"
},
"message": "Ich bin’s der echte ██U2██.",
"created_time": "2018-08-02T09:02:16+0000",
"id": "2021000871244096_2067313976612785"
},
{
"from": {
"name": "██U3██",
"id": "███2062"
},
"message": "It's a me! ██U3██",
"created_time": "2018-08-02T09:03:43+0000",
"id": "2021000871244096_2067315156612667"
},
{
"message": "such a lonely boat 😢",
"created_time": "2018-08-02T09:15:12+0000",
"id": "2021000871244096_2067325063278343"
},
{
"message": "Der Gerät schneidet das Fleisch schweißfrei.",
"created_time": "2018-08-02T09:18:23+0000",
"comments": {
"data": [
{
"from": {
"name": "██P1██",
"id": "███6166"
},
"message": "Der Gerät ist vor die Chef in Geschäft!",
"created_time": "2018-08-02T09:23:02+0000",
"id": "2021000871244096_2067334489944067"
}
],
"paging": {
"cursors": {
"before": "QVFIUlpUWEduOVRaRGFITEFGajgxaXNadkhMVDVjbUwxMGRuelhRVzdNUHprak81U3dIVTFoQmQydkR1U0I2T09nMVAxcVVaN2Y3S1oyeUMyVVVTTVpMRm5B",
"after": "QVFIUlpUWEduOVRaRGFITEFGajgxaXNadkhMVDVjbUwxMGRuelhRVzdNUHprak81U3dIVTFoQmQydkR1U0I2T09nMVAxcVVaN2Y3S1oyeUMyVVVTTVpMRm5B"
}
}
},
"id": "2021000871244096_2067330469944469"
},
{
"message": "",
"created_time": "2018-08-02T09:19:34+0000",
"id": "2021000871244096_2067331519944364"
},
{
"message": "",
"created_time": "2018-08-09T09:01:43+0000",
"id": "2021000871244096_2079260155418167"
},
{
"message": "Heyho. Ich bins",
"created_time": "2018-08-09T09:10:48+0000",
"id": "2021000871244096_2079269595417223"
},
{
"message": "Heyho. Ich bin nochmal",
"created_time": "2018-08-09T09:11:49+0000",
"id": "2021000871244096_2079270622083787"
}
],
"paging": {
"cursors": {
"before": "WTI5dGJXVnVkRjlqZAFhKemIzSTZANakEyTWpVMU56STNNemMxTlRFeU1qb3hOVE15T1RVMk5UTXgZD",
"after": "WTI5dGJXVnVkRjlqZAFhKemIzSTZANakEzT1RJM01EWXlNakE0TXpjNE56b3hOVE16T0RBMU9UQTUZD"
}
}
},
"id": "195180353826166_2021000871244096"
},
{
"id": "195180353826166_227658903911644"
},
{
"id": "195180353826166_147002885360315"
}
],
"paging": {
"cursors": {
"before": "Q2c4U1pXNTBYM0YxWlhKNVgzTjBiM0o1WDJsa0R5TXhPVFV4T0RBek5UTTRNall4TmpZANk5ESXpNalV5TXpjMU5qZA3hPVFUwTWpnek5ROE1ZAWEJwWDNOMGIzSjVYMmxrRHlBeE9UVXhPREF6TlRNNE1qWXhOalpmTWpBeU1UQXdNRGczTVRJME5EQTVOZAzhFZAEdsdFpRWmJQT2p6QVE9PQZDZD",
"after": "Q2c4U1pXNTBYM0YxWlhKNVgzTjBiM0o1WDJsa0R5UXhPVFV4T0RBek5UTTRNall4TmpZANkxUVTBNamN3T0RrMU16QXlNVE15TWpJNU1UWVBER0ZA3YVY5emRHOXllVjlwWkE4ZAk1UazFNVGd3TXpVek9ESTJNVFkyWHpFME56QXdNamc0TlRNMk1ETXhOUThFZAEdsdFpRWk5XbFQxQVE9PQZDZD"
}
}
},
"id": "195180353826166"
}
As you can see, for some comments, the "from" field is missing and I don't know why (Example: comment with id 2021000871244096_2067325063278343 ("such a lonely boat 😢")).
P1 is the page itself
U1, U2 are users with admin rights
U3 is a normal user who liked the page
The author of 2021000871244096_2067325063278343 hasn't liked the page but the author of 2021000871244096_2079269595417223 has liked it afterwards (comment 2021000871244096_2079270622083787).
Is there any way to get the names of all users who comment on my page?
Reached out to FB-Dev-Group and FB-Platform Support. They don't include everything due to user settings and privacy reasons
https://developers.facebook.com/support/bugs/1618790588170504/
Plus, your app needs to be approved and live (mine is still in development mode)
https://www.facebook.com/groups/fbdevelopers/permalink/1897897803587058
I have subscribed for page subscription for Facebook real time updates with Fields as "feed". When i am creating a new event, the Facebook real time updates sends me a wrong entry. The entry i got as a real time update is below.
{
"entry": [
{
"changes": [
{
"field": "feed",
"value": {
"photo_id": 1128416807216170,
"**post_id": "902483569809496_1128416807216170"**,
"sender_name": "Unofficial: Aerospace Demodavid",
"sender_id": 902483569809496,
"item": "photo",
"verb": "edited",
"link": "https://scontent.ford1-1.fna.fbcdn.net/t31.0-8/13717445_1128416807216170_1696828468485436508_o.jpg",
"published": 1,
"created_time": 1470269376
}
}
],
"id": "902483569809496",
"time": 1470269377
}
],
"object": "page"
}
From the above entry, if i query the Graph API for postid : 902483569809496_1128416807216170 , i get the below JSON response
{
"created_time": "2016-08-04T00:09:36+0000",
"actions": [
{
"name": "Like",
"link": "https://www.facebook.com/902483569809496/photos/gm.713007008848308/1128416807216170/?type=3"
},
{
"name": "Comment",
"link": "https://www.facebook.com/902483569809496/photos/gm.713007008848308/1128416807216170/?type=3"
},
{
"name": "See Friendship",
"link": "https://m.facebook.com/friendship/902483569809496/713006992181643/"
}
],
"from": {
"name": "Unofficial: Aerospace Demodavid",
"category": "Aerospace/Defense",
"id": "902483569809496"
},
"icon": "https://www.facebook.com/images/icons/photo.gif",
"is_hidden": false,
"is_expired": false,
"link": "https://www.facebook.com/902483569809496/photos/gm.713007008848308/1128416807216170/?type=3",
"object_id": "1128416807216170",
"picture": "https://scontent.xx.fbcdn.net/v/t1.0-0/s130x130/13892116_1128416807216170_1696828468485436508_n.jpg?oh=967e908192fcadc72eae9c11047f87e2&oe=582D6009",
"privacy": {
"allow": "",
"deny": "",
"description": "",
"friends": "",
"value": "EVERYONE"
},
"status_type": "added_photos",
"subscribed": false,
"to": {
"data": [
{
"id": "713006992181643",
"name": "Stevie G Event"
}
]
},
"type": "photo",
"updated_time": "2016-08-04T00:09:36+0000",
"id": "902483569809496_1128416807216170"
}
But the actual thing added here was an event and not a photo. The id should be 902483569809496_713006992181643 as in the below JSON and not 902483569809496_1128416807216170 which came from the real time update. Below is the JSON response which i am getting when i query the Graph API manually using the account id without using the real time update information.
{
"id": "902483569809496_713006992181643",
"from": {
"name": "Unofficial: Aerospace Demodavid",
"category": "Aerospace/Defense",
"id": "902483569809496"
},
"story": "Unofficial: Aerospace Demodavid added an event.",
"story_tags": {
"0": [
{
"id": "902483569809496",
"name": "Unofficial: Aerospace Demodavid",
"type": "page",
"offset": 0,
"length": 31
}
],
"41": [
{
"id": "713006992181643",
"name": "Stevie G Event",
"type": "event",
"offset": 41,
"length": 5
}
]
},
"picture": "https://scontent.xx.fbcdn.net/v/t1.0-0/c39.0.130.130/p130x130/13892116_1128416807216170_1696828468485436508_n.jpg?oh=5adc792bca82e0b110b3d6d98b81feae&oe=581E2680",
"link": "https://www.facebook.com/events/713006992181643/",
"name": "Stevie G Event",
"caption": "Stevie G Event",
"description": "Stevie G is the best",
"icon": "https://www.facebook.com/images/icons/event.gif",
"actions": [
{
"name": "Comment",
"link": "https://www.facebook.com/902483569809496/posts/713006992181643"
},
{
"name": "Like",
"link": "https://www.facebook.com/902483569809496/posts/713006992181643"
}
],
"privacy": {
"value": "EVERYONE",
"description": "",
"friends": "",
"allow": "",
"deny": ""
},
"type": "event",
"status_type": "created_event",
"object_id": "713006992181643",
"created_time": "2016-08-04T00:09:35+0000",
"updated_time": "2016-08-04T00:09:35+0000",
"is_hidden": false,
"is_expired": false
}
Why is there an inconsistency with the Facebook real time updates sent for an event creation. It treats it as a photo edit and not an event creation.
Please let me know if i am missing something.
when getting my feed with /me/feed it seems that the first comment on posts of other users on my wall is represented another time in the feed as an independent status entry (also has a different id) itself.
It looks like the following JSON output. The first entry of the list is apparently generated from the first comment of the second entry of the list.
I could not reproduce the problem, another post on my wall I commented on turned out normal (= no duplicate entry for first comment)
Is this a bug in Facebook itself or can someone explain this behavior?
[
{
"id": "someID_4300357461829",
"from": {
"name": "user1",
"id": "someID"
},
"story": "\"na oida\" on user2's post on your wall.",
"story_tags": {
"13": [
{
"id": "someID2",
"name": "user2",
"offset": 13,
"length": 15,
"type": "user"
}
]
},
"type": "status",
"created_time": "2012-11-03T01:41:15+0000",
"updated_time": "2012-11-03T01:41:15+0000",
"comments": {
"count": 0
}
},
{
"id": "someID_4300356661809",
"from": {
"name": "user2",
"id": "someID2"
},
"to": {
"data": [
{
"name": "user1",
"id": "someID"
}
]
},
"message": "hi!",
"actions": [
{
"name": "Comment",
"link": "https://www.facebook.com/someID/posts/4300356661809"
},
{
"name": "Like",
"link": "https://www.facebook.com/someID/posts/4300356661809"
}
],
"type": "status",
"created_time": "2012-11-03T01:40:54+0000",
"updated_time": "2012-11-03T01:45:21+0000",
"comments": {
"data": [
{
"id": "someID_4300356661809_4479943",
"from": {
"name": "user1",
"id": "someID"
},
"message": "na oida",
"created_time": "2012-11-03T01:41:15+0000"
},
{
"id": "someID_4300356661809_4479949",
"from": {
"name": "user1",
"id": "someID"
},
"message": "interesting",
"created_time": "2012-11-03T01:42:31+0000"
},
{
"id": "someID_4300356661809_4479956",
"from": {
"name": "user1",
"id": "someID"
},
"message": "another one",
"created_time": "2012-11-03T01:44:40+0000"
},
{
"id": "someID_4300356661809_4479959",
"from": {
"name": "user2",
"id": "someID3"
},
"message": "spam",
"created_time": "2012-11-03T01:45:21+0000"
}
],
"count": 4
}
}
]
I had this same issue. I've submitted a bug to facebook. Vote it up - https://developers.facebook.com/bugs/483624361705934
Just in case you haven't realised, those "wrong" posts doesn't have any action in it, so you can filter the right posts just checking if actions exist.
I am working on this site and I want to import photos from facebook group.
https://www.facebook.com/EveryoneLovesaGoldenRetriever/photos
If you visit this link above you will be able to see three albums under heading "Everyone loves a Golden Retriever's Albums" and many photos under heading "Photos of Everyone loves a Golden Retriever" i am able to fetch photos under the albums but not able to sort out how can i fetch other photos that doesnt belong to any albums and comes under heading "Photos of Everyone loves a Golden Retriever"
Thanks you very much in advance
SP
https://graph.facebook.com/115641638572281/tagged
{
"data": [
{
"id": "115641638572281_446639348697240",
"from": {
"name": "Sudhir Puranik",
"id": "100000535372598"
},
"to": {
"data": [
{
"name": "Everyone loves a Golden Retriever",
"category": "Small business",
"id": "115641638572281"
}
]
},
"picture": "http://a2.sphotos.ak.fbcdn.net/hphotos-ak-ash3/s320x320/541201_446639348697240_100000535372598_1627958_1814759730_n.jpg",
"link": "http://www.facebook.com/photo.php?fbid=446639348697240&set=o.115641638572281&type=1",
"icon": "http://static.ak.fbcdn.net/rsrc.php/v2/yz/r/StEh3RhPvjk.gif",
"actions": [
{
"name": "Comment",
"link": "http://www.facebook.com/115641638572281/posts/446639348697240"
},
{
"name": "Like",
"link": "http://www.facebook.com/115641638572281/posts/446639348697240"
}
],
"type": "photo",
"object_id": "446639348697240",
"application": {
"name": "Photos",
"id": "2305272732"
},
"created_time": "2012-05-15T07:43:58+0000",
"updated_time": "2012-05-15T07:43:58+0000",
"comments": {
"count": 0
}
},
{
"id": "115641638572281_446033935424448",
"from": {
"name": "Sudhir Puranik",
"id": "100000535372598"
},
"to": {
"data": [
{
"name": "Everyone loves a Golden Retriever",
"category": "Small business",
"id": "115641638572281"
}
]
},
"picture": "http://a5.sphotos.ak.fbcdn.net/hphotos-ak-ash3/s320x320/547601_446033935424448_100000535372598_1626229_2008301193_n.jpg",
"link": "http://www.facebook.com/photo.php?fbid=446033935424448&set=o.115641638572281&type=1",
"icon": "http://static.ak.fbcdn.net/rsrc.php/v2/yz/r/StEh3RhPvjk.gif",
"actions": [
{
"name": "Comment",
"link": "http://www.facebook.com/115641638572281/posts/446033935424448"
},
{
"name": "Like",
"link": "http://www.facebook.com/115641638572281/posts/446033935424448"
}
],
"type": "photo",
"object_id": "446033935424448",
"application": {
"name": "Photos",
"id": "2305272732"
},
"created_time": "2012-05-14T12:59:13+0000",
"updated_time": "2012-05-15T14:19:48+0000",
"likes": {
"data": [
{
"name": "Barbara Fried",
"id": "1336683610"
}
],
"count": 1
},
"comments": {
"data": [
{
"id": "115641638572281_446033935424448_1363348",
"from": {
"name": "Barbara Fried",
"id": "1336683610"
},
"message": "They look like total love dogs!",
"created_time": "2012-05-15T14:19:48+0000"
}
],
"count": 1
}
}
],
"paging": {
"previous": "https://graph.facebook.com/115641638572281/tagged?format=json&limit=2&since=1337067838&__previous=1",
"next": "https://graph.facebook.com/115641638572281/tagged?format=json&limit=2&until=1337000352"
}
}
In the facebook Graph API. the actual message of the object appears as "message": or "story":
Example:
{
"id": "148550335191249_236850319694583",
"from": {
"name": "Sinners Highway",
"category": "Musician/band",
"id": "148550335191249"
},
"story": "Sinners Highway edited their Biography and Band Interests.",
"story_tags": {
"0": [
{
"id": 148550335191249,
"name": "Sinners Highway",
"offset": 0,
"length": 15
}
]
},
"type": "status",
"created_time": "2011-09-02T21:49:50+0000",
"updated_time": "2011-09-02T21:49:50+0000",
"comments": {
"count": 0
}
},
and this one:
{
"id": "148550335191249_258570210855927",
"from": {
"name": "Sinners Highway",
"category": "Musician/band",
"id": "148550335191249"
},
"message": "LETS GET ROCKIN'! ",
"picture": "http://platform.ak.fbcdn.net/www/app_full_proxy.php?app=123966167614127&v=1&size=z&cksum=81c39517d99ba86af6a77df2c4879810&src=http\u00253A\u00252F\u00252Fstatic.bandsintown.com\u00252Fimages\u00252Ffacebook\u00252Fpromote\u00252Fnew-date.png",
"link": "http://bnds.in/q0cSbN",
"name": "Sinners Highway \u0040 The Grange in Nottingham, United Kingdom",
"caption": "Sunday, November 27, 2011 at 6:00pm",
"properties": [
{
"name": "Tickets",
"text": "http://bnds.in/nqft0W",
"href": "http://bnds.in/nqft0W"
},
{
"name": "More Tour Dates",
"text": "http://bnds.in/oZ6VTg",
"href": "http://bnds.in/oZ6VTg"
}
],
"type": "link",
"application": {
"name": "Bandsintown",
"canvas_name": "concertsbybit",
"namespace": "concertsbybit",
"id": "123966167614127"
},
"created_time": "2011-10-21T17:44:12+0000",
"updated_time": "2011-10-21T20:01:31+0000",
},
From what I can tell its completely random whether it is a message or a story.
Does anybody know where and when the story attribute is used and why?
Well from those two examples, the noticeable difference is that the story was an activity that was auto-posted about something the band did on facebook (editing their profile), whereas the message was something that someone has posted on the page wall.