0
我嘗試開發一個應用程序,它使用OauthConsumer與LinkedIN進行連接。 一切正常,我可以提取用戶數據,但是當我想更新用戶狀態時,我的狀態錯誤401與消息[未授權]。 我已經訪問令牌,這是代碼:Oauth Consumer - LinkedIN UPDATE STATUS
NSURL *url = [NSURL URLWithString:@"https://api.linkedin.com/v1/people/~/current-status"];
OAMutableURLRequest *request1 = [[OAMutableURLRequest alloc] initWithURL:url
consumer:consumer
token:accToken//
realm:nil //
signatureProvider:nil] ; //
NSLog(@"mytoken%@",[request1 token]);
[request1 setHTTPMethod:@"PUT"];
[request1 setHTTPBodyWithString:@"<?xml version=''1.0'' encoding=''UTF-8'?><current-status>is setting their status using the LinkedIn API.</current-status>"];
OADataFetcher *fetcher = [[OADataFetcher alloc] init];
[fetcher fetchDataWithRequest:request1
delegate:self
didFinishSelector:@selector(status:didFinishWithData:)
didFailSelector:@selector(status:didFailWithError:)];
任何想法?請幫助我!!!!!! :( TNX