Facebook如何使用Graph API获取实际的照片URL? [英] Facebook how to get actual photo URL using Graph API?
问题描述
可以使用图形获取Facebook图像的实际图像URL。
It is possible to get the actual image url of a Facebook image using the Graph api??
例如,对于以下照片
http://www.facebook.com/photo.php?fbid=357755307655174
实际的网址是
https://fbcdn-sphotos-aa.akamaihd.net/hphotos-ak-ash4/252428_530045532341_5136_n.jpg
是否有一些图api的方法来实现这个?
Is there some graph api way to achieving this?
推荐答案
有没有一些图api的方式来实现这个?
Is there some graph api way to achieving this?
因此,您必须查看源
照片对象:
Therefore, you’d have to look at the source
field of the photo object:
$ b $来源:
e照片 - 目前这可以有最大宽度或高度720px,在2012年3月1日增加到960像素
The source image of the photo - currently this can have a maximum width or height of 720px, increasing to 960px on 1st March 2012
表示有效网址的字符串
这将为您提供照片上传的较小图像的原始尺寸,或调整为最大尺寸。对于更大的尺寸,您必须检查图像
字段:
That’ll give you the original size the photo was uploaded for smaller images, or resized to max. 960px in each direction.
p>
For even larger sizes, you’d have to check the images
field:
图片:
images:
照片的4种不同的存储表示
The 4 different stored representations of the photo
包含高度,宽度和源字段的对象数组
array of objects, containing height, width, and source fields
这个承诺提供更大的尺寸(fe 2048×1417px) - 但请注意,如果原始尺寸不大,则这些条目仍将提供较小的图像。
This "promises" to deliver much larger sizes (f.e. 2048×1417px) – but be aware, these entries will still deliver a smaller image if the original one wasn’t as large as requested.
这篇关于Facebook如何使用Graph API获取实际的照片URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!