简体   繁体   中英

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?

Try to use:

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

It will return all albums ID

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM