Facebook的图形API图片 [英] facebook graph api picture
本文介绍了Facebook的图形API图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何检索使用图形API朋友们的图片。
我设法让我的朋友用这个头像
https://graph.facebook.com/ {} USER_ID
不过,我想我的朋友已发布的照片。
我能够得到这个数据
链接:http://www.facebook.com/photo.php?fbid=121312&set=a.23342344855.11344514&type=1
名:〜KAALAM时刻:)
说明:51个新的照片,
图标:http://static.ak.fbcdn.net/rsrc.php/v1/yz/r/StEh3RhPvjk.gif
行动:[
{
名:注释,
链接:http://www.facebook.com/1140004514/posts/12234
},
{
名:像,
链接:http://www.facebook.com/1140004514/posts/12234
}
]
类型:照片,
的object_id:2554798026153,
解决方案
要得到你需要你朋友的照片
- 与
friends_photos
有效的访问令牌 - HTTP GET
\\ {friendId} \\照片
获得照片的朋友被标记在
或
- 与
friends_photos
有效的访问令牌 - HTTP GET
\\ {friendId} \\专辑
来得到朋友的专辑上市后,环通是由\\获取每个相册的照片{ ALBUMID} \\照片
试一下这里: https://developers.facebook.com/tools/explorer
How can I retrieve friends picture using graph api. I have manage to get my friends profile picture using this
https://graph.facebook.com/{user_id}
But, I want to get the photos my friend has posted.
I am able to get this data
"link": "http://www.facebook.com/photo.php?fbid=121312&set=a.23342344855.11344514&type=1",
"name": "~KAALAM moments :)",
"caption": "51 new photos",
"icon": "http://static.ak.fbcdn.net/rsrc.php/v1/yz/r/StEh3RhPvjk.gif",
"actions": [
{
"name": "Comment",
"link": "http://www.facebook.com/1140004514/posts/12234"
},
{
"name": "Like",
"link": "http://www.facebook.com/1140004514/posts/12234"
}
],
"type": "photo",
"object_id": "2554798026153",
解决方案
To get your friend's pictures you will need
- Valid access token with
friends_photos
- HTTP GET
\{friendId}\photos
to get photo's the friend is tagged in
or
- Valid access token with
friends_photos
- HTTP GET
\{friendId}\albums
to get a friend's albums listing, loop thru it to get the photos in each album by\{albumId}\photos
Try it out here: https://developers.facebook.com/tools/explorer
这篇关于Facebook的图形API图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文