简体   繁体   中英

help with tweetsharp API v2 for WP7

I'm using the new version of tweetsharp api (v2) and i've had some problems with 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM