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

落爺英雄遲暮 提交于 2019-12-03 08:51:55

问题


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".


回答1:


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];`


来源:https://stackoverflow.com/questions/5731394/could-not-authenticate-oauth-while-using-twitter-from-sharekit-in-iphone-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!