开发者

could not authenticate OAuth while using twitter from sharekit in iphone app

开发者 https://www.devze.com 2023-02-27 16:52 出处:网络
I m implementing facebook & twitter share using sharekit in iphone 开发者_JAVA技巧app. Facebook share is working fine but twitter share gives error \"could not authenticate OAuth\".I was having th

I m implementing facebook & twitter share using sharekit in iphone 开发者_JAVA技巧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];`
0

精彩评论

暂无评论...
验证码 换一张
取 消