如何使用Facebook PHP SDK检索Facebook用户的朋友相册信息 [英] How to retrieve facebook user's friends albums information with facebook php sdk
问题描述
我是Facebook开发的新手,所以请耐心等待我:)我正在创建一个管理相册用户的应用.我正在开发的功能之一需要访问朋友的照片.我的意思是,我的应用程序用户可以看到他的朋友的照片.如何检索那张相册和照片信息?我具有user_photos和friends_photos权限.有任何建议吗?
提前谢谢!
对不起,我la脚的英语.不是我的母语.
塞巴斯蒂安
您需要进行API调用,为此您可以使用Facebook Graph API.查看下面的相册API
http://developers.facebook.com/docs/reference/api/album/
这是出于一般目的,但是您需要首先从这里拉出所有朋友
http://developers.facebook.com/docs/reference/api/FriendList/
要获取朋友的相册,您还需要设置权限
http://developers.facebook.com/docs/reference/api/permissions/
检查:friends_photos
您可以像这样简单地获取相册
https://graph.facebook.com/ {userId}/albums?accessToken = something >
PS.您需要一张一张地拉出朋友的相册.
Im kind of new in facebook development, so be patient with me :) I'm creating an app that manage the photo albums user. One of the features i'm developing needs to access the friends photos. I mean, the photos that my app user can see of his friends. How can retrieve thats albums and photos information? I have user_photos and friends_photos permission. Any sugestion?
Thanks in advance!!
Sorry for my lame english. Is not my native language.
Sebastian
You need to make an API call, for this you can use Facebook Graph API. Look at the following API for albums
http://developers.facebook.com/docs/reference/api/album/
This is for generic purpose, however you need to first pull all the friends from here
http://developers.facebook.com/docs/reference/api/FriendList/
To fetch the albums of a friend you also need to set permissions
http://developers.facebook.com/docs/reference/api/permissions/
check:friends_photos
You can simply fetch the album like this
https://graph.facebook.com/{userId}/albums?accessToken=something
PS. you need to pull albums of friends one by one.
这篇关于如何使用Facebook PHP SDK检索Facebook用户的朋友相册信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!