After trying @vileo solution with a bundle parameter:
Bundle params = new Bundle();
params.putString("fields", "id,name,icon,administrator");
params.putString("icon_size", "34");
// Put the access token in it
params.putString("access_token", Session.getActiveSession().getAccessToken());
And remove all following fields from this:
me/groups?fields=id,name,icon,administrator&icon_size=34
To this:
/me/groups
To do the request with this:
Bundle params = new Bundle();
params.putString("fields", "id,name,icon,administrator");
params.putString("icon_size", "34");
new Request(
Session.getActiveSession(),
"/me/groups",
params,
HttpMethod.GET,
new Request.Callback() {
public void onCompleted(Response response) {
if (response.getError() != null) {
LogUtils.LOGE(TAG, "@ Request user_group failed: " + response.getError().getErrorMessage());
} else {
GraphObject go = response.getGraphObject();
UserGroup userGroup =
new Gson().fromJson(go.getInnerJSONObject().toString(), UserGroup.class);
LogUtils.LOGD(TAG, "Group string::: " + go.getInnerJSONObject().toString());
if (userGroup != null) {
PrefUtils.setFbUserGroup(activity, userGroup);
}
}
}
}
).executeAsync();
Finally I got the correct response...
Group string::: {"data":[{"id":"258966464271933","icon":"https:\/\/fbstatic-a.akamaihd.net\/rsrc.php\/v2\/yH\/r\/k5fKtX9s4PO.png","name":"[咪04] 人才許願池(徵才\/求職\/接案\/發案\/合作)"},{"id":"197223143437","icon":"https:\/\/fbstatic-a.akamaihd.net\/rsrc.php\/v2\/y5\/r\/La_vzova_d2.png","name":"Python Taiwan"},{"id":"262800543746083","icon":"https:\/\/fbstatic-a.akamaihd.net\/rsrc.php\/v2\/yf\/r\/tDvnAIzL8Ft.png","name":"node.js台灣"},...}}
I'm curious why FB not mention this to keep us guessing around..