如何获得Facebook用户的语言?

时间:2014-08-09 10:40:54

标签: facebook-graph-api

我搜索了Facebook的API,但我无法弄清楚如何获取用户语言。例如,如果用户在“联系人/基本信息”页面中输入“法语”,“德语”作为他们的语言,我想知道api获取该信息

1 个答案:

答案 0 :(得分:3)

您可以从API获取语言 - “Facebook页面代表此人所知的语言”。

“'user_likes'权限用于通过Facebook API获取语言。

您可以在此处查看有关如何获取用户语言详细信息的说明 https://developers.facebook.com/docs/android/graph

点击https://developers.facebook.com/docs/graph-api/reference/v2.1/page

从Facebook api查看可用信息列表 https://developers.facebook.com/docs/graph-api/reference/v2.1/user

请参阅此代码了解语言信息权限

{
        bio = "Love sports of all kinds.";
        birthday = "01/01/1980";
        "favorite_athletes" =             (
                            {
                id = 20242388857;
                name = "Usain Bolt";
            }
        );
        "first_name" = Chris;
        hometown =             {
            id = 106033362761104;
            name = "Campbell, California";
        };
        id = 100003086810435;
        languages =             (
                            {
                id = 108106272550772;
                name = French;
            },
                            {
                id = 312525296370;
                name = Spanish;
            }
        );
        "last_name" = Colm;
        link = "http://www.facebook.com/chris.colm";
        locale = "en_US";
        location =             {
            id = 104048449631599;
            name = "Menlo Park, California";
        };
        "middle_name" = Abe;
        name = "Chris Abe Colm";
        timezone = "-7";
        "updated_time" = "2012-08-09T03:33:32+0000";
        username = "chris.colm";
        verified = 1;
    }