2011-10-22 149 views
-1

有一段時間我得到的錯誤消息OAuth身份驗證失敗,而我試圖登錄/使用sharekit.Kan共享日期到Twitter任何一個幫助爲什麼我得到這個錯誤?sharekit:OAuth身份驗證失敗,推特

#define SHKTwitterUseXAuth 0在SHKConfig.h文件中設置

+0

經過鏈接可能有助於OAuth的失敗問題[oauthfailed](http://hostmonsterforums.com/showthread.php ?9502 - OAuth的認證失敗的) – 2011-10-22 14:03:48

回答

4

在嘰嘰喳喳的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];