从 Facebook 图表中检索照片 url
我目前正在通过调用以下地址从 Facebook 获取新闻源: https://graph.facebook.com/me /home 。此处返回的对象有一个“from”键,其中包含名称、ID,有时还包含类别。我知道我可以抓取 ID 并将 /picture 放在末尾来获取图片的 url,但我不想进行额外的调用。有谁知道我是否可以传递一些标志来强制 from 对象也有一个个人资料图片?
I am currently fetching my news feed from facebook from a call to: https://graph.facebook.com/me/home . Objects returned here have a "from" key, that has Name, ID, and sometimes category. I know that I can grab the ID and put /picture on the end to get the url of the picture, but I don't want to have to make an extra call. Does anyone know if there is some flag I can pass in which forces the from object to also have a profile Pic in there too?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为这是不可能的,我猜测你可以使用
fields
参数来过滤返回的结果,但你不能扩展它......不是一个方法我知道。但你真的不需要这个,你的问题并不是真正的问题,只要你有对象ID,你就可以认为你有“照片网址”,这实际上有很多好处:
我的意思是:
和:
另外,返回 json 中的照片 URL 并不意味着您不需要进行“额外调用”来实际获取/显示图像!
I don't think this is possible, I guess you can use the
fields
parameter to filter the returned results but you can't extend it...not a method that I know.BUT you really don't need that, your issue isn't really a problem as long as you have the object ID you can consider that you have the "photo url", this actually has a lot of benefits:
I mean what is the difference between:
And:
Also, having the photo URL in the json returned doesn't mean that you don't need to make an "extra call" to actually get/display the image!