Example #1
0
        /// <summary>
        /// Loads the profile of the current user to a ME object, when ready the given callback is fired
        /// </summary>
        public static void GetCurrent(Action<Me> callback)
        {
            if (_Current == null)
            {
                FBDataAccess.Current.GetGraph("me", data =>
                {
                    _Current = FBEntity.Parse<Me>(data);

                    callback.Invoke(_Current);
                });
            }
            else
            {
                callback.Invoke(_Current);
            }
        }
Example #2
0
        private void LoadItem()
        {
            LoadingManager.Start();

            Me.GetCurrent(me =>
            {
                LoadingManager.Stop();

                if (me == null)
                {
                    App.MyApp.NavigateToLogin();
                }
                else
                {
                    Item = me;

                    ThreadHelper.RunOnUI(() =>
                    {
                        LoadMeData();
                    });
                }
            });
        }