Reputation: 21
I started to programming in Android a few weeks ago. And I have some Java skills.
So I am creating an app which needs to get the Facebook friends list (just the names not the pictures). I Googled and most people said "read the Facebook api". How can I get the list of friends?
Upvotes: 2
Views: 1545
Reputation: 28470
Use the Facebook Graph API.
To implement the Facebook Graph API in an Android app, use the Facebook Android SDK - you can find it on github. It includes an example app called Hackbook. You can read about Hackbook's features here. By going through the Hackbook's code you can learn how to do user authorization and login to Facebook on Android.
The Hackbook contains sample code for how to get a list of friends - see source and details on Facebook Developer pages.
Upvotes: 1
Reputation: 532
The friends.get command gives you all friends from a corresponding user. You find the description of the REST webservice command here http://developers.facebook.com/docs/reference/rest/friends.get/
If you program in Java you need the facebook java api http://code.google.com/p/facebook-java-api/
Here's a short example how to connect to facebook api and how to get a user's friends list and further operations http://code.google.com/p/facebook-java-api/wiki/Examples
Upvotes: 1