Вопрос

In my android application i want to fetch my facebook friends and for that i am using facebook-android-sdk-3.7. I referred FriendPickerSample which is provided by facebook-android-sdk itself. Here, it returns friendlist as a list of GraphUser. Now, i want to fetch username of all friends but the problem is that it doesn't provide username of friendlist. It provides all other personal information of friends except userName.So what should i do to get username of friends? Please suggest any solution for that. Thank you.

Это было полезно?

Решение

I'm not sure what's the code inside that sample which is fetching the user details, so I can not suggest you some changes to fetch the username.

Anyways, that sample must be providing you the user_id. So, you can make this call to get the username of that friend-

/{user-id}?fields=username

Demo

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top