示例#1
0
        protected async override void OnAppearing()
        {
            FacebookUser _facebookUser = new FacebookUser();
            User         _user         = new User();

            if (!String.IsNullOrEmpty(token))
            {
                _facebookUser = await _social.GetFacebookProfileAsync(token);

                var gps = new GetGPS();
                var loc = await gps.updateLocation();

                //List<CouponSchedule> googledCoupons = await google.GoogleNearby(loc);
                _user = _azure.GetUser(_facebookUser.Id, "fbId");

                //_user = _azure.GetUserInfo(_facebookUser.Id);
                await Navigation.PushModalAsync(new MainPage(_user));

                //else if(token == null)
                //    await Navigation.PushModalAsync(new MainPage(App.Token));
                //Debug.WriteLine("token in app is =" + App.Token);
                //Debug.WriteLine("back!!");
                //token = App.Token;
            }
        }