Facebook Graph API:在一个请求中获取更大的图片 [英] Facebook Graph API : get larger pictures in one request

查看:19
本文介绍了Facebook Graph API:在一个请求中获取更大的图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用 Graph API Explorer 进行一些测试.这是一个很好的工具.

我想获取用户的好友列表,包括好友的姓名、ID 和图片.所以我输入:

https://graph.facebook.com/me/friends?fields=id,picture,name

但是图片只有 50x50,我想要一张更大的在这个请求中.

有可能吗?

解决方案

虽然你不需要拉 'picture' 属性.有更方便的方法,您唯一需要的是用户 ID,请参见下面的示例;

https://graph.facebook.com/user_id/picture?type=large >

附言type 定义你想要的尺寸

请记住,使用具有基本权限的令牌,/me/friends 将仅返回具有 id+name 属性的朋友列表

I'm currently using the Graph API Explorer to make some tests. That's a good tool.

I want to get the user's friend list, with friends' names, ids and pictures. So I type :

https://graph.facebook.com/me/friends?fields=id,picture,name

But picture is only 50x50, and I would like a larger one in this request.

Is it possible ?

解决方案

you do not need to pull 'picture' attribute though. there is much more convenient way, the only thing you need is userid, see example below;

https://graph.facebook.com/user_id/picture?type=large

p.s. type defines the size you want

plz keep in mind that using token with basic permissions, /me/friends will return list of friends only with id+name attributes

这篇关于Facebook Graph API:在一个请求中获取更大的图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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