Android facebook api, get diffrent size profile picture

那年仲夏 提交于 2019-12-20 06:48:10

问题


I'm using the relatively new Facebook graph api. I'm getting a list of friends and their profile pics that use the app.

I'm not sure how to modify the parameters that I'm sending so that the picture that is returned is large. The default one that's returned currently is to small.

I'm using the newMyFriendsRequest.

the parms I send it look like this...

Bundle parameters = new Bundle();
parameters.putString("fields", "picture,name");

request.setParameters(parameters);
request.executeAsync();

Not sure how to add a parm to that requests so the picture returned to me is large.

Can anyone help?


回答1:


Requesting /user-id/picture?type=large gives you a larger version of the profile picture.

You can use type in the request you are making like this,

parameters.putString("fields", "picture.type(large),name");


来源:https://stackoverflow.com/questions/33739867/android-facebook-api-get-diffrent-size-profile-picture

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!