예제 #1
0
        private void Default_Loaded(object sender, RoutedEventArgs e)
        {
            if (NavigationContext.QueryString.Count > 0)
            {
                try
                {
                    string type = NavigationContext.QueryString.Values.First();

                    if (type == "Facebook")
                    {
                        facebook.Authenticate(this.socialBrowser, AuthComplete);
                    }
                    else if (type == "Twitter")
                    {
                        orequest = new OAuthRequest()
                        {
                            RequestUri = "http://api.twitter.com/oauth/request_token",
                            AuthorizeUri = "http://api.twitter.com/oauth/authorize",
                            AccessUri = "http://api.twitter.com/oauth/access_token",
                            Method = "POST",
                            ConsumerKey = "NvL5YaZLrJ6tV3n4tK33g",
                            ConsumerSecret = "mLcwj2tIV9xkg9riBHawXC4dhzHKZUJe7LhWq8le0"
                        };

                        orequest.Authenticate(this.socialBrowser, AuthenticationComplete);
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }