如何在我的应用程序中获取用户相册的封面照片? 目前,我有一个像这样的json:
"id": "00000",
"albums": {
"data": [
{
"id": "428076573767",
"from": {
"name": "Benjamin",
"id": "00000"
},
"name": "Profile Pictures",
"link": "https://www.facebook.com/album.php?fbid=00000&id=00000&aid=00000",
"cover_photo": "10151465301937683",
"privacy": "everyone",
"count": 57,
"type": "profile",
"created_time": "2010-09-05T08:42:19+0000",
"updated_time": "2013-04-27T23:53:11+0000",
"can_upload": false
},
}
我如何通过网址获取cover_photo?
答案 0 :(得分:1)
您可以通过将此添加到网址来获取封面照片。无需从Json中提取cover_photo。
album['id']?>/picture?access_token=12345
// where album is JSON array and access_token is random here..
试试这个。它会起作用。