有些时候,当我尝试使用sharekit登录/分享日期到Twitter时,我收到错误消息OAuth身份验证失败。任何一个帮助我为什么会收到此错误?
在SHKConfig.h文件中设置了 #define SHKTwitterUseXAuth 0
答案 0 :(得分:4)
有些时候,此身份验证失败错误消息是由于Twitter API中的c更改而导致的,并且可能无法在Sharekit中更新。 请在SHKTwitter.m中验证在init方法中,authorizeURL,requestURL和accessURL应如下所示,即在twitter之前添加api。
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"];
并在sendStatus方法中验证https应该如下所示
OAMutableURLRequest *oRequest = [[OAMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"https://api.twitter.com/1/statuses/update.json"]
consumer:consumer
token:accessToken
realm:nil
signatureProvider:nil];