我尝试开发一个使用 OauthConsumer 与 LinkedIN 连接的应用程序。一切正常,我可以提取用户数据,但是当我想更新用户状态时,我的状态错误 401 带有消息 [未授权]。我有访问令牌,这是代码:
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