0

We can share a message(text) through LinkedIn integration in iPhone Apps.....

But Is there any possibility to share a local image or url image through LinkedIn integration in iPhone Apps......?

Thanks In Advance.....

Ashok
  • 5,585
  • 5
  • 52
  • 80

2 Answers2

2

Any how i got a relative solution...

Sharing an image in LinkedIn integration in iPhone---->

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", 
                        statusTextView.text, @"comment",[[NSDictionary alloc]
                                                         initWithObjectsAndKeys:
                                                         @"description goes here",@"description",
                                                         @"www.google.com",@"submittedUrl",
                                                         @"title goes here",@"title",
                                                         @"http://economy.blog.ocregister.com/files/2009/01/linkedin-logo.jpg",@"submittedImageUrl",nil],@"content", 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:)];
Ashok
  • 5,585
  • 5
  • 52
  • 80
  • 1
    But the Limitations are...-->Not supported for local images..-->Not supported for high memory url images. – Ashok Feb 15 '13 at 10:48
  • @AshokKumarIOS...I know this method...& also its limitation.That's why I am not suggested you by this way...& simple advice you that it is not possible dude. – Vishal Feb 15 '13 at 10:57
  • @AshokKumarS, I used your code but Image is not shown when I open my account in the browser. – user1673099 Dec 25 '13 at 09:58
1

I think no.I was able to send text to LinkedIn via share kit . But I was not unable to upload image to LinkedIn. So, I think it is not possible.

Avi Kumar
  • 4,403
  • 8
  • 36
  • 67
Vishal
  • 8,246
  • 6
  • 37
  • 52
  • @Vishal.. is it possible to Share an Image in Google+ integration.. See My Another Question in [link](http://stackoverflow.com/questions/14872759/sharing-images-in-google-using-iphone-app) – Ashok Feb 15 '13 at 10:04