如何在一个API调用中获取大的照片URL? [英] How to get large photo URL in one API call?

查看:174
本文介绍了如何在一个API调用中获取大的照片URL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想立即在我的Facebook应用的Feed视图中显示大图。可以使用一个API调用从流/ Feed获取大型照片src URL吗?照片ID在流/ Feed中返回,当然可以在附加的FQL或图形API调用中提供此照片ID,以检索有关该照片的所有信息。但是,有没有办法使用多查询或批量调用来获取更大的照片src url使用一个API往返?

I want to display large photos in my Facebook app's feed view immediately. Is it possible to get the large photo src URL from a stream/feed using one API call? The photo id is returned in the stream/feed and one can of course then supply this photo id in an additional FQL or graph API call to retrieve all the information about that photo. However, is there a way using multi-query or batch calls to get a larger photo src url using one API roundtrip?

推荐答案

我没有使用流/ feed照片进行尝试,但普遍接受的方法是:

I haven't tried this with stream/feed photos, but the generally accepted way of doing this is:

http://graph.facebook.com/{ID of object}/picture

如果你想要大版本,你会做的:

If you want the "large" version, you would do:

http://graph.facebook.com/{ID of object}/picture?type=large

我不是100%肯定这是否适用于实际照片(而不是用户个人资料)图片或页面个人资料图片),但我有一个希望 - 唯一的警告是,你显然必须有一个被授权查看照片的登录用户(除非是公开的)。

I'm not 100% sure if this would work for an actual photo (instead of a user profile picture or page profile pic), but I have a hunch it will - the only caveat is that you obviously must have a logged in user that is authorized to view the photo (unless it's public).

这篇关于如何在一个API调用中获取大的照片URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆