我可以将评论发布到 LinkedIn,但无法发布image
. 这是发布评论的代码:
NSURL *url = [NSURL URLWithString:@"http://api.linkedin.com/v1/people/~/shares"];
OAMutableURLRequest *request =
[[OAMutableURLRequest alloc] initWithURL:url
consumer:self.consumer
token:self.accessToken
callback:nil
signatureProvider:nil];
NSString *postedStr = self.textView.text;
NSDictionary *update = [[NSDictionary alloc] initWithObjectsAndKeys:
[[NSDictionary alloc]
initWithObjectsAndKeys:
@"anyone",@"code",nil], @"visibility",
postedStr, @"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:)];
// [self.view addSubview:linkedinView];
[request release];
任何建议都非常感谢!