1
在我的應用程序中使用ShareKit集成FB & Twitter狀態更新。 FB服務工作正常。然而,在我的Twitter服務,我遇到了這個錯誤:錯誤的簽名錯誤
Twitter Send Status Error: {"request":"\/1\/statuses\/update.json","error":"Incorrect signature"}
這裏是我的代碼:
if (m_prodDetails != nil && [m_prodDetails count] > 0) {
NSString *strTemp = [[NSString alloc] initWithString:API_HOSTSERV_PROD_URL];
// http://ipasarmalam.com/p/proddetails.aspx?id=55344
NSString *urlString = [strTemp stringByAppendingString: [m_prodDetails objectAtIndex:0]];
NSURL *url = [NSURL URLWithString:urlString];
if (url != nil) {
NSLog(@"url is correct: %@", url);
}
NSLog(@"urlString: %@", urlString);
NSLog(@"url: %@", url);
SHKItem *item = [SHKItem URL:url title:m_prodName.text];
SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];
[actionSheet showFromTabBar:self.tabBarController.tabBar];
[strTemp release];
}
這發生在我身上1-3rd嘗試,但是當我嘗試再次運行/調試應用程序,它會更新成功。
所以,我不知道什麼是真正的問題。 消費者密碼都是正確的。
有什麼想法?這真是太奇怪了,我一直沒有找到具體的答案,但我想這與oAuth有關。
Twitter的OAuth是被更新和上ShareKit休息側。需要將https://twitter.com/更改爲https://api.twitter.com/。提交bug並解決。 http://bit.ly/k5nnbB – 2011-05-24 06:49:59
謝謝謝謝謝謝!還請記住將更新URL更改爲https OAMutableURLRequest * oRequest = [[OAMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@「https://api.twitter.com/1/statuses/update.json」] 消費者:消費者 token:accessToken realm:nil signatureProvider:nil]; – 2011-05-24 09:10:31