简体   繁体   English

WP7的tweetsharp API v2帮助

[英]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... 我正在使用新版本的tweetsharp api(v2),并且在wp7上实现时遇到了一些问题...

i'm developping one app that use this api for tweet phrases to user account who's use my application... 我正在开发一个使用此api来向使用我的应用程序的用户帐户发送推文短语的应用程序...

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... 因此,配置twiter用户帐户时,我将登录名和密码保存为...当用户想要发推时,我可以访问他的帐户并发推该短语...

My problem is how to make the login to twitter account... i try this but it's not woking.... 我的问题是如何使登录到Twitter帐户...我尝试执行此操作,但操作不正常...。

    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.... 我已经阅读了Api v2文档,但是它与我的方法不同,因为某些方法是新的并且与文档报告不同。

thanks very much for help... 非常感谢您的帮助...

stab- have twitter ok'd you for xAuth? 刺入-Twitter是否可以使用xAuth? Apparently, it's only permissible if your app/apiKeys have been whitelisted for it. 显然,仅当您的app / apiKeys被列入白名单时,才允许这样做。

Read this: https://dev.twitter.com/docs/oauth/xauth 阅读此内容: https : //dev.twitter.com/docs/oauth/xauth

Your other apps for iPhone may have used regular OAuth and not xAuth. 您用于iPhone的其他应用可能已使用常规OAuth,而不是xAuth。 Like dethSwatch said, Apps have to be approved by Twitter in order to use xAuth. 就像dethSwatch所说的那样,必须使用Twitter才能批准Apps才能使用xAuth。

Only caveat with xAuth is you do not get access tokens to direct messages. 只有xAuth告诫您,您没有获得直接令牌的访问令牌。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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