Beispiel #1
0
 private void LoadMyDataAPI(string url, MyDataDelegate callback = null)
 {
     FB.API(meQueryString, HttpMethod.GET, delegate(IGraphResult result)
     {
         if (result.Error == null)
         {
             Dictionary <string, string> dictionary = GraphUtil.DeserializeJSONProfile(result.RawResult);
             List <object> friends = GraphUtil.DeserializeJSONFriends(result.RawResult);
             string id             = "me";
             if (dictionary.ContainsKey("id"))
             {
                 id = dictionary["id"];
             }
             string name = dictionary["first_name"];
             int value   = PlayerData.Instance.LifetimeChunk.Value;
             FBPlayer f  = new FBPlayer(id, name, playing: false, invited: false, value, 0L);
             string url2 = GraphUtil.DeserializePictureURL(result.ResultDictionary);
             LoadMyPicture(url2, f, friends, callback);
         }
     });
 }