Hello there! First off, this is a great and easy-to-use library, from what I've seen so far (being a noob at programming).
So, I'm trying to retrieve a user's timeline in a Windows Phone 7.1 app, which works perfectly after going through the authorization process (I'm using your OAuth.xaml page for that). But when loading previously stored credentials into an authorizer, it
simply doesn't authenticate against Twitter's servers and returns a WebException with "The remote server returned an error: NotFound." It's the exact same result as passing no authorizer to the TwitterContext constructor at all.
Here's the code I'm using in the MainPage.Loaded event handler:
var slAuth = new SilverlightAuthorizer(); // tried PinAuthorizer too
var credentials = new InMemoryCredentials();
slAuth.Credentials = credentials;
SharedState.Authorizer = slAuth;
ITwitterAuthorizer auth = SharedState.Authorizer;
if (auth == null || !auth.IsAuthorized)
NavigationService.Navigate(new Uri("/Views/OAuth.xaml", UriKind.Relative));
var ctx = new TwitterContext(auth);
(from tweet in ctx.Status
where tweet.Type == StatusType.Home
var timelineTweets =
(from tweet in tweets
select new Tweet
RealName = tweet.User.Name,
Message = tweet.Text,
Avatar = tweet.User.ProfileImageUrl
Timeline.DataContext = new TweetList(TweetList.Type.Timeline, timelineTweets);
I'm storing the credentials like you're suggesting
here, only that I'm calling pinAuth.Credentials.ToString().
Any help is appreciated. Also, it seems like other people here are having difficulty with restoring credentials too, so a small sample would be great!