我有这个片段
AsyncFacebookRunner mAsyncRunner = new AsyncFacebookRunner(mFacebook);
Bundle bundle = new Bundle();
bundle.putString("fields", "birthday");
mAsyncRunner.request("me/friends", bundle, new FriendListRequestListener());
它以某种方式起作用,我的意思是我可以读取所有朋友的 ID。但是在我想阅读所有内容时,我该怎么做?
String _error = null;
JSONObject json = Util.parseJson(response);
final JSONArray friends = json.getJSONArray("data");
for (int i = 0; i < friends.length(); i++) {
Log.v("id:", "id= "+friends.get(i).toString());
}
我应该怎么做才能获取有关我朋友的信息并阅读该信息
我想这是关键,这是我找到的示例,它工作正常
bundle.putString("fields", "birthday");
但是当我举个例子时,它不起作用
bundle.putString("fields", "friends_relationships");
----------------- 编辑 1-------------------------
权限代码
mFacebook.authorize(Example.this, new String[] {"offline_access", "user_interests", "friends_interests","friends_relationships","friends_relationship_details"},new DialogListener() {
@Override
public void onComplete(Bundle values) {}
@Override
public void onFacebookError(FacebookError error) {}
@Override
public void onError(DialogError e) {}
@Override
public void onCancel() {}
});
-------------- 编辑 2 --------------
{"error":{"message":"必须使用活动访问令牌来查询当前用户的信息。","type":"OAuthException","code":2500}}