私はこのスニペットを持っています
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 --------------
{"エラー":{"メッセージ":"アクティブなアクセス トークンを使用して、現在のユーザーに関する情報を照会する必要があります。","type":"OAuthException","code":2500}}