Android的:如何使用access_token获取Facebook的用户图像 [英] Android: How to get facebook user image using access_token

查看:972
本文介绍了Android的:如何使用access_token获取Facebook的用户图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作需要登录与Facebook 的应用程序。这是当我在我的应用程序集成Fb的API的第一次。我从开始开始使用Facebook的SDK为Android 和放大器;顺利拿到FB access_token
有三个活动中的在我的应用程序和放大器;我需要管理的是已登录用户的个人资料图片&放大器;所有这些名称活动当用户使用Facebook的成功让登录。照片我知道,我可以查询FB的 GraphAPI 和放大器;使用access_token获取当前登录的用户的完整个人资料数据。我成功通过有效的 access_token 加上Using_
https://graph.facebook.com/me?<access_token>获得的用户配置文件数据;&放大器;格式= JSON
我需要登录的用户的配置文件的图像,以及(这需要用户的<$c$c>fb_id)
<$c$c>http://graph.facebook.com/<fb_id>/picture?type=large
Is它可能使用来获得用户的个人资料图片 access_token

I am working on an application that need to login with facebook. This is the first time when i am integrating Fb API in my application. I have start from Getting Started with the Facebook SDK for Android & successfully get fb access_token.
There are three Activitie in my application & what i need to manage is to have logged in user's Profile Image & name on all these Activities when user successfully get login using facebook.
I know, i can query fb GraphAPI & get complete profile data of current logged-in user using access_token. I succeed to get profile data of user by using valid access_token using_
https://graph.facebook.com/me?<access_token>&format=json
I need the profile image of login user as well(which need user's fb_id)
http://graph.facebook.com/<fb_id>/picture?type=large
Is it possible to get user's profile image using access_token?

推荐答案

最后,长时间的寻找后,我得到了只使用访问登录用户的图像的方式 access_token      https://graph.facebook.com/me/picture?access_token=<your_access_token_here>!
感谢@Jess的宝贵答案

Finally, after a long search, i got the way to access login user's image by using only access_token https://graph.facebook.com/me/picture?access_token=<your_access_token_here>
thanks to @Jess for your valuable answer!

这篇关于Android的:如何使用access_token获取Facebook的用户图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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