私はiPhoneアプリを開発しています。そのアプリでは、ステータスを更新するためにLinkedIn統合を使用しています...しかし、ステータスを更新できません..どんな助けでも感謝されます.
よろしくお願いします
- (IBAction)postButton_TouchUp:(UIButton *)sender
{
[statusTextView rejectFirstResponder];
NSURL *url = [NSURL URLWithString:@"http://api.linkedin.com/v1/people/~/shares"];
OAMutableURLRequest *request =
[[OAMutableURLRequest alloc] initWithURL:url
consumer:oAuthLoginView.consumer
token:oAuthLoginView.accessToken
callback:NO
signatureProvider:nil];
NSDictionary *update = [[NSDictionary alloc] initWithObjectsAndKeys:
[[NSDictionary alloc]
initWithObjectsAndKeys:
@"anyone",@"code",nil], @"visibility",
statusTextView.text, @"comment", nil];
NSLog(@"statusTextView.text is---%@",statusTextView.text);
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSString *updateString = [update JSONString];
NSLog(@"updateString is---%@",updateString);
[request setHTTPMethod:@"POST"];
[request prepare];
[request setHTTPBodyWithString:updateString];
OADataFetcher *fetcher = [[OADataFetcher alloc] init];
[fetcher fetchDataWithRequest:request
delegate:self
didFinishSelector:@selector(postUpdateApiCallResult:didFinish:)
didFailSelector:@selector(postUpdateApiCallResult:didFail:)];
[request release];
}