private static void OnTokenChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) { TwitterAuth twitterAuth = o as TwitterAuth; if (twitterAuth != null) { twitterAuth.OnTokenChanged((string)e.OldValue, (string)e.NewValue); } }
private static TwitterService GetTwitterService(Tuple<string, string> authKeys) { TwitterService service = new TwitterService(authKeys.Item1, authKeys.Item2); OAuthRequestToken requestToken = service.GetRequestToken(); Uri uri = service.GetAuthorizationUri(requestToken); var taw = new TwitterAuth() { AuthUrl = uri }; taw.ShowDialog(); OAuthAccessToken access = service.GetAccessToken(requestToken, taw.Token); service.AuthenticateWith(access.Token, access.TokenSecret); return service; }
private static object OnCoerceToken(DependencyObject o, object value) { TwitterAuth twitterAuth = o as TwitterAuth; if (twitterAuth != null) { return(twitterAuth.OnCoerceToken((string)value)); } else { return(value); } }
private static object OnCoerceAuthUrl(DependencyObject o, object value) { TwitterAuth twitterAuth = o as TwitterAuth; if (twitterAuth != null) { return(twitterAuth.OnCoerceAuthUrl((Uri)value)); } else { return(value); } }
private static TwitterService GetTwitterService(Tuple <string, string> authKeys) { TwitterService service = new TwitterService(authKeys.Item1, authKeys.Item2); OAuthRequestToken requestToken = service.GetRequestToken(); Uri uri = service.GetAuthorizationUri(requestToken); var taw = new TwitterAuth() { AuthUrl = uri }; taw.ShowDialog(); OAuthAccessToken access = service.GetAccessToken(requestToken, taw.Token); service.AuthenticateWith(access.Token, access.TokenSecret); return(service); }