user3445541
user3445541

Reputation: 73

Facebook SDK Unity. how to get a list of friends who play this game?

How to get a list of friends who play in my game or who install my game?

This code is not working:

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);

Upvotes: 2

Views: 2511

Answers (1)

Sahil Mittal
Sahil Mittal

Reputation: 20753

You're query is absolutely correct. I'm not sure but the problem could be that you have not urlencoded the fql query.

You can try this-

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;

Upvotes: 1

Related Questions