OpenGraph - 未接收所有数据

时间:2015-02-16 13:10:27

标签: android facebook facebook-graph-api

我在我的应用程序中使用Facebook登录按钮并请求以下内容:

LoginButton facebookLoginButton = (LoginButton) findViewById(R.id.authButton);
facebookLoginButton.setReadPermissions(Arrays.asList(
    "email",
    "user_birthday",
    "user_likes",
    "user_location",
    "user_relationships"
));

但是我没有在UserObject中获得user_likes,我得到的是:

{
    "birthday":"...",
    "location":{"id":"...","name":"..."},
    "locale":"...",
    "link":"...",
    "updated_time":"...",
    "relationship_status":"...",
    "id":"...",
    "languages":[...],
    "first_name":"...",
    "timezone": ...,
    "email":"...",
    "verified":true,
    "name":"...",
    "last_name":"...",
    "gender":"...."
}

我也尝试了一些其他权限,但我只收到这些详细信息。

1 个答案:

答案 0 :(得分:0)

默认情况下,/ me端点并非返回所有字段。您需要在您的请求中添加类似?fields = likes的内容。