I want to know how to select all the friends in Facebook's FriendPicker sample program. I added a 'select all' button in Pickerfragment class. But i couldn't able to find the way to check all the friends.
Asked
Active
Viewed 1,632 times
0
-
Do you want achieve it using Facebook API or via intent ? – GrIsHu Jan 11 '13 at 04:23
-
I want to do it by intent – Gugan Jan 11 '13 at 04:24
-
Did you figure it out? I have the same issue. – m1sk Apr 17 '13 at 12:11
-
Hi I implemented FacebookFriendPicker but for some reason it gives me only my friends that have the same app installed (app I implemented FB SDK in). Is it possible to make it a list with all my friends? The thing is I need to choose which friends to invite to join my app – rosu alin Jul 04 '14 at 15:29
3 Answers
1
Try this :
Bundle params = new Bundle();
params.putString("fields", "name, picture");
JSONObject jsonFrends = Util.parseJson(facebook.request("me/friends", params));

GOLDEE
- 2,318
- 3
- 25
- 49
-
You can also try this : https://github.com/facebook/facebook-android-sdk/blob/master/examples/simple/src/com/facebook/android/BaseRequestListener.java – GOLDEE Jan 11 '13 at 04:17
1
I could not find a way to do it in Friend Picker sample program. Simply I used graph api to get friends list and listed in list view with a checkbox next to friend's name.
And I added a button that checks all the friends. When I press the button it will iterate over all the friends and checks them.
The idea is pretty simple.
I can't post my code.
I hope you can get some sample programs to get it done.
Ask me if you need more help.

Gugan
- 1,625
- 2
- 27
- 65
-
@m1sk You just try what I said :-) I will guide you, if you get stuck in something. – Gugan Apr 18 '13 at 04:57
-
it just that this is my first android project, so I dont really know what im doing. thanks alot anyway. – m1sk Apr 18 '13 at 08:10
-
Oops.. I'm sorry buddy.. I should not show my code.. You just try to start. There are tons of tutorials available if you follow my idea. – Gugan Apr 18 '13 at 08:53
0
Try out this way :
Intent m_fb=getOpenFacebookIntent(m_context); startActivity(m_fb);
Method getOpenFacebookIntent()
is as below:
public static Intent getOpenFacebookIntent(Context context) { try { context.getPackageManager().getPackageInfo("com.facebook.katana", 0); return new Intent(Intent.ACTION_VIEW, Uri.parse("fb://profile/<userid>/fans")); } catch (Exception e) { return new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.facebook.com/abc.xyz")); } }
You can use Official Facebook App with Intent listed HERE.

GrIsHu
- 29,068
- 10
- 64
- 102
-
-
-
I want to 'select all the friends' (check all the friends) in a single click in that FriendPicker project. – Gugan Jan 11 '13 at 06:56
-
1You need to create your custom listview layout and in that you need to inflate the list of friends which you get and manage the selection on the checkbox click. You can achieve it using Facebook SDK effectively. – GrIsHu Jan 11 '13 at 06:58