Mark selected user as checked in FriendPicker (Facebook SDK for Android)
android, facebook, picker, sdk
Solution
You have to pass comma separated string with selected facebook user ids in the bundle to the FriendPickerFragment.
Bundle args = new Bundle();
args.putString("com.facebook.android.PickerFragment.Selection", "11111, 2222, 333, already selected facebook ids....");
friendPickerFragment = new FriendPickerFragment(args);
In PickerFragment's onActivityCreated() it will parse the selected ids shows as selected in list. You can see the following code in PickerFragment in FacebookSDK.
selectionStrategy.readSelectionFromBundle(savedInstanceState, SELECTION_BUNDLE_KEY);
Problem
I've done the tutorials for the Facebook SDK for Android (Especially the "Show Friends"-tutorial). How can I mark the selected users which i've selected before at the PickerActivity when i click on the "Show Friends"-button again?