The FriendSmash sample is kind of hard to follow and i was wondering if anybody had just a simple way to retrieve these using the Unity Facebook SDK?
Please help!
Thank you!
PS: if possible, how do you put each friend’s profile picture in an NGUI UITexture?
Mgayar
2
Use this function to get the picture
public static string GetPictureURL(string facebookID, int? width = null, int? height = null, string type = null)
{
string url = string.Format("/{0}/picture", facebookID);
string query = width != null ? "&width=" + width.ToString() : "";
query += height != null ? "&height=" + height.ToString() : "";
query += type != null ? "&type=" + type : "";
query += "&redirect=false";
if (query != "") url += ("?g" + query);
return url;
}