private void OnLogin(object sender, OnLoginEventArgs args) { if (args.Account == null) { return; } if (args.StayLoggedIn) { Services.Services.GetInstance().AccountService.SaveAccount(args.Account, AppName); } HttpService.SendAuthenticationCredentials(args.Account); var httpClient = new WalkieTalkyClient(); var model = httpClient.CreateGetRequest(args.Account.Properties["access_token"]); var request = new OAuth2Request("GET", new Uri("https://graph.facebook.com/me"), null, args.Account); request.GetResponseAsync().ContinueWith(t => { if (t.IsFaulted) { } else { string json = t.Result.GetResponseText(); var x = new JSONObject(json); // StartNavigationService(model); } }); StartNavigationService(model); }
protected override void OnStart() { var account = Services.Services.GetInstance().AccountService.GetAccountFor(AppName); if (account != null) { var httpClient = new WalkieTalkyClient(); var model = httpClient.CreateGetRequest(account.Properties["access_token"]); var request = new OAuth2Request("GET", new Uri("https://graph.facebook.com/me"), null, account); request.GetResponseAsync().ContinueWith(t => { if (t.IsFaulted) { } else { string json = t.Result.GetResponseText(); var x = new JSONObject(json); // StartNavigationService(model); } }); StartNavigationService(model); } }
public async void Execute(object parameter) { //var restModel = parameter as RestCallViewModel; var walkiestalkyclient = new WalkieTalkyClient(); string fakeToken = "iulian"; var personRecord = walkiestalkyclient.CreateGetRequest(fakeToken); }