在我的iPad应用程序中,我想在LinkedIn中发布一个URL。
现在,我正在使用这些API:
http://api.linkedin.com/v1/people/~/shares参考Docs
NSURL *url = [NSURL URLWithString:@"http://api.linkedin.com/v1/people/~/shares"];
OAMutableURLRequest *request =
[[OAMutableURLRequest alloc] initWithURL:url
consumer:_oAuthLoginView.consumer
token:_oAuthLoginView.accessToken
callback:nil
signatureProvider:nil];
NSDictionary *update = [[NSDictionary alloc] initWithObjectsAndKeys:
[[NSDictionary alloc]
initWithObjectsAndKeys:
@"anyone",@"code",nil] , @"visibility",
@"www.google.com", @"comment", nil];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSString *updateString = [update JSONString];
[request setHTTPBodyWithString:updateString];
[request setHTTPMethod:@"POST"];
OADataFetcher *fetcher = [[OADataFetcher alloc] init];
[fetcher fetchDataWithRequest:request
delegate:self
didFinishSelector:@selector(postUpdateApiCallResult:didFinish:)
didFailSelector:@selector(postUpdateApiCallResult:didFail:)];
以上代码有效,我可以将此www.google.com发布到LinkedIn。
但是,将此网址替换为: http://itunes.apple.com/us/app/now-next/id724323924?ls=1&mt=8
它提供来自api的成功响应代码。但是,我在LinkedIn中看不到任何包含此URL的帖子。
任何帮助将不胜感激。 请伙计们携手..