Facebook SDK Unity。如何获得玩这个游戏的朋友列表?

时间:2014-04-15 13:16:29

标签: facebook facebook-graph-api unity3d facebook-fql facebook-unity-sdk

如何获取在我的游戏中玩游戏或安装游戏的朋友列表?

此代码无效:

string fql = "/fql?q=SELECT uid, name, is_app_user, pic_square FROM user WHERE uid IN "+
                    "(SELECT uid2 FROM friend WHERE uid1 = me()) AND is_app_user = 1";

FB.API(fql, Facebook.HttpMethod.GET, GetListOfPlayer);

1 个答案:

答案 0 :(得分:0)

您的查询绝对正确。我不确定,但问题可能是你没有urlencoded fql查询。

你可以试试这个 -

string query = WWW.EscapeURL("SELECT uid, name, is_app_user, pic_square FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND is_app_user = 1");
string fql = "/fql?q="+query;