帮助 WP7 的 tweetsharp API v2
我正在使用新版本的 tweetsharp api (v2),并且在 wp7 上实现时遇到了一些问题...
我正在开发一个应用程序,该应用程序使用此 api 将推文短语发送给使用我的应用程序的用户帐户...
因此,要配置推特用户帐户,我将登录名和密码保存到...当用户想要发推文时,我可以访问他的帐户并推文该短语...
我的问题是如何登录推特帐户...我尝试这个,但它不工作...
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)
{
}
我已经阅读了 Api v2 文档,但它与我的方法不同,因为有些方法是新的并且与文档报告不同...
非常感谢您的帮助...
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...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Sta- Twitter 同意你进行 xAuth 了吗?显然,只有当您的 app/apiKeys 已被列入白名单时才允许这样做。
stab- have twitter ok'd you for xAuth? Apparently, it's only permissible if your app/apiKeys have been whitelisted for it.
阅读此内容:https://dev.twitter.com/docs/oauth/xauth
您的其他 iPhone 应用程序可能使用常规 OAuth 而不是 xAuth。就像 dethSwatch 所说,应用程序必须得到 Twitter 的批准才能使用 xAuth。
xAuth 的唯一警告是您无法获得直接消息的访问令牌。
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.