如何获取Facebook用户的朋友和个人资料图片的朋友使用图表api v2.0? [英] How to get a facebook users friends and profile picture of friends using graph api v2.0?

查看:90
本文介绍了如何获取Facebook用户的朋友和个人资料图片的朋友使用图表api v2.0?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Facebook已经将他们的图形API最近更新为v2.0(2014年4月30日)。什么是标准api调用来获取Facebook的朋友和他们的个人资料图片? (我/朋友不工作,因为我想要所有的朋友不是使用该应用程序的朋友)

解决方案

 code>下一个代码将为想要的大小提供带有URL的图标的taggable_friends。 

会话session = Session.getActiveSession();
Bundle params = new Bundle();
params.putString(fields,picture.width(+ size.x +).height(+ size.y +));
请求请求=新请求(会话,/ me / taggable_friends,params,HttpMethod.GET,新的Request.Callback(){
public void onCompleted(响应响应){


}
});
Request.executeBatchAsync(request);


Facebook have updated their graph api to v2.0 recently (april 30, 2014). What is the standard api call to get facebook friends and their profile pictures now? (me/friends does not work as I want all of the friends not friends who use the app)

解决方案

    Next code will provide the taggable_friends with Url pictures at wanted sizes.

Session session = Session.getActiveSession();
    Bundle params = new Bundle();
    params.putString("fields", "picture.width(" + size.x + ").height(" + size.y + ")");
    Request request = new Request(session, "/me/taggable_friends", params, HttpMethod.GET, new Request.Callback() {
        public void onCompleted(Response response) {


        }
    });
    Request.executeBatchAsync(request);

这篇关于如何获取Facebook用户的朋友和个人资料图片的朋友使用图表api v2.0?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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