preventSmash preventSmash - 1 month ago 13
Android Question

How do I get album id's from the Facebook graph api?

I am sending a request with the following url: https://graph.facebook.com/v2.3/me/albums?

The response I am getting is

"data": [
{
"id": "X",
"from": {
"id": "X",
"name": "Robert S"
},
"name": "Profile Pictures",
"link": "LINK",
"cover_photo": "X",
"privacy": "everyone",
"count": 11,
"type": "profile",
"created_time": "2010-09-04T07:02:31+0000",
"updated_time": "2015-04-08T23:49:48+0000",
"can_upload": false
},
{
"id": "X",
"from": {
"id": "X",
"name": "Robert S"
},
"name": "Cover Photos",
"link": "LINK",
"cover_photo": "X",
"privacy": "everyone",
"count": 1,
"type": "cover",
"created_time": "2014-12-02T04:45:56+0000",
"updated_time": "2014-12-02T04:45:56+0000",
"can_upload": false
}
]


Notice how the id's are the same? I replaced the actual id with 'X' for demonstration purposes. It does this for every one of my photo albums.

How do I get unique id's for each photo album?

Answer

Try to use:

https://graph.facebook.com/v2.3/me/albums?fields=id

It will return all albums ID

Comments