在iphone应用程序中使用来自sharekit的twitter时无法验证OAuth [英] could not authenticate OAuth while using twitter from sharekit in iphone app

查看:116
本文介绍了在iphone应用程序中使用来自sharekit的twitter时无法验证OAuth的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在实施facebook& Twitter分享在iphone应用程序中使用sharekit。 Facebook的分享工作正常,但Twitter分享给出了无法验证OAuth的错误。

解决方案

我遇到了同样的问题 - 这个修复它:



https:// github .com / ideashower / ShareKit / issues / 229



摘要:



更改SHKTwitter.m在54-56行中

  https://twitter.com/ 

  https://api.twitter。 com / 

这样:

  self.authorizeURL = [NSURL URLWithString:@https://api.twitter.com/oauth/authorize]; 
self.requestURL = [NSURL URLWithString:@https://api.twitter.com/oauth/request_token];
self.accessURL = [NSURL URLWithString:@https://api.twitter.com/oauth/access_token];

和第323行,从http到https:



'pre> OAMutableURLRequest * oRequest = [[OAMutableURLRequest的alloc] initWithURL:[NSURL URLWithString:@ https://api.twitter.com/1/statuses/update.json]
消费者:消费者
令牌:accessToken
领域:nil
signatureProvider:nil];`


I m implementing facebook & twitter share using sharekit in iphone app. Facebook share is working fine but twitter share gives error "could not authenticate OAuth".

解决方案

I was having the same problem - this fixed it:

https://github.com/ideashower/ShareKit/issues/229

Summary:

Change SHKTwitter.m in lines 54-56 from

https://twitter.com/

to

https://api.twitter.com/

like this:

self.authorizeURL = [NSURL URLWithString:@"https://api.twitter.com/oauth/authorize"];
self.requestURL = [NSURL URLWithString:@"https://api.twitter.com/oauth/request_token"];
self.accessURL = [NSURL URLWithString:@"https://api.twitter.com/oauth/access_token"];

and in line 323, from http to https:

OAMutableURLRequest *oRequest = [[OAMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"https://api.twitter.com/1/statuses/update.json"]
consumer:consumer
token:accessToken
realm:nil
signatureProvider:nil];`

这篇关于在iphone应用程序中使用来自sharekit的twitter时无法验证OAuth的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆