private static void loadByIdFacebook(String idFacebook_, afterAction after_)
    {
        ParseQuery <ParseObject> query = ParseObject.GetQuery("Usuario").WhereEqualTo("idFacebook", idFacebook_);

        query.FindAsync().ContinueWith(t =>
        {
            Debug.Log("Loading user");
            IEnumerable <ParseObject> results = (IEnumerable <ParseObject>)t.Result;
            List <ParseObject> result_        = results.ToList();
            foreach (ParseObject user in result_)
            {
                string objectId        = user.ObjectId;
                string idFacebook      = user.Get <string>("idFacebook");
                int points             = user.Get <int>("points");
                global_user.idObject   = objectId;
                global_user.idFacebook = idFacebook;
                global_user.points     = points;
            }
            after_();
        });
    }
Beispiel #2
0
 public static void CallFBLogin(afterAction accion_)
 {
     accion = accion_;
     FB.Login("public_profile,email,user_friends,publish_actions", LoginCallback);
 }