I am able to post the comment to LinkedIn but not able to post the image. This is the code for posting the comment:
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];
Any suggestion really appreciated!
try this bellow code may be its help you:-
i found this from bellow stackover flow answer:-
Can't share using OAuth Starter Kit for LinkedIn
EDIT:-
For
TamilKingcomment reply. you can get image URL of you currunt Location using Google API. First you need to get you currunt Location Image Like:-That given you current Location image for example:-
Now you have to convert this above NSString to NSURL like
and use this url that you want to share in to LinkedIn. hope that helps you.