Facebook api:访问好友照片
我被要求为一家广播电台创建一个竞赛页面。该页面应允许用户选择一些他们想要参加有奖活动的 Facebook 好友。选择并确认好友后,页面应生成好友个人资料图片的拼贴画。
我知道我可以使用 graph api 获取任何人的个人资料图片的 200px 宽版本(假设它是公开的)。即使不公开,有什么办法可以获取照片吗?买一个更大的版本怎么样?
我没有 FB 开发人员方面的经验,因此我将不胜感激任何其他有用资源的链接。
I've been asked to create a contest page for a radio station. The page should allow users to select a few of their Facebook friends that they want to participate in the prize event. After the friends have been chosen and confirmed the page should generate a collage of the friends' profile pictures.
I know I can get the 200px wide version of anyone's profile picture(assuming it's public) using the graph api. Is there any way to get the picture even if it isn't public? How about getting a bigger version of it?
I have no experience with the FB developer side, so I will appreciate any links to other useful resources.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
摘自 Facebook Graph API 文档:
您可以渲染任何对象的当前个人资料照片通过将后缀 /picture 添加到对象 URL 中。例如,这将渲染您的公开个人资料照片:
您可以使用 type 参数指定您想要的图片尺寸,该尺寸应该是正方形 (50x50)、小(50 像素宽,可变高度)和大(大约 200 像素)之一宽,可变高度): http://graph.facebook.com/facebookid/picture?type =大。
Taken from the Facebook Graph API documentation:
You can render the current profile photo for any object by adding the suffix /picture to the object URL. For example, this will render your public profile photo:
You can specify the picture size you want with the type argument, which should be one of square (50x50), small (50 pixels wide, variable height), and large (about 200 pixels wide, variable height): http://graph.facebook.com/facebookid/picture?type=large.