I'm using the new version of tweetsharp api (v2) and i've had some problems wit开发者_如何学Goh implementation on wp7...
i'm developping one app that use this api for tweet phrases to user account who's use my application...
so to configure the twiter user account i save the login and password to... when user wants to tweet i get access to his account and tweet that phrase...
My problem is how to make the login to twitter account... i try this but it's not woking....
private void button1_Click(object sender, RoutedEventArgs e)
{
var service = new TwitterService(consumerKey, consumerSecret);
Action<OAuthAccessToken, TwitterResponse> act = new Action<OAuthAccessToken, TwitterResponse>((a, b) => Result(a, b));
try
{
service.GetAccessTokenWithXAuth(username,password,act);
}
catch (Exception) {
}
}
private void Result(OAuthAccessToken a, TwitterResponse b)
{
}
I've read the Api v2 documentation but it's diferent than my method because some methods are new and different than the documentation reports....
thanks very much for help...
stab- have twitter ok'd you for xAuth? Apparently, it's only permissible if your app/apiKeys have been whitelisted for it.
Read this: https://dev.twitter.com/docs/oauth/xauth
Your other apps for iPhone may have used regular OAuth and not xAuth. Like dethSwatch said, Apps have to be approved by Twitter in order to use xAuth.
Only caveat with xAuth is you do not get access tokens to direct messages.
精彩评论