Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8857477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:35:57+00:00 2026-06-14T14:35:57+00:00

I am able to post the comment to LinkedIn but not able to post

  • 0

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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T14:35:58+00:00Added an answer on June 14, 2026 at 2:35 pm

    try this bellow code may be its help you:-

    -(void)postUpdateHERE
    {
      NSURL *url = [NSURL URLWithString:@"http://api.linkedin.com/v1/people/~/shares"];
      OAMutableURLRequest *request =
      [[OAMutableURLRequest alloc] initWithURL:url
                                consumer:[self getConsumer]
                                   token:self.accesstoken
                                callback:nil
                       signatureProvider:nil];
    
      NSDictionary *update = [[NSDictionary alloc] initWithObjectsAndKeys:
    
                        [[NSDictionary alloc]
                         initWithObjectsAndKeys:
                         @"anyone",@"code",nil], @"visibility",
    
                        @"comment goes here", @"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:@"json" forHTTPHeaderField:@"x-li-format"];
      [request setValue:@"application/xml" 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:)];
    
    }
    

    i found this from bellow stackover flow answer:-

    Can't share using OAuth Starter Kit for LinkedIn

    EDIT:-

    For TamilKing comment reply. you can get image URL of you currunt Location using Google API. First you need to get you currunt Location Image Like:-

    NSString *staticMapUrl = [NSString stringWithFormat:@"http://maps.google.com/maps/api/staticmap?markers=color:red|%f,%f&%@&sensor=true",lat, log,@"zoom=12&size=114x116"];    //That above staticMapURl NSlog is :http://maps.google.com/maps/api/staticmap?markers=color:red|1.282130,103.803131&zoom=12&size=114x116&sensor=true
    

    That given you current Location image for example:-

    enter image description here

    Now you have to convert this above NSString to NSURL like

    NSURL *mapUrl = [NSURL URLWithString:[staticMapUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; 
    

    and use this url that you want to share in to LinkedIn. hope that helps you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am Using LinkedIn-j API for LinkedIn Integration. I am able to post Status
I am able to post to a users feed using a URL from my
I need to be able to comment to an article, but also be able
i am trying to make the post using my linkedin api application, The issue
As briefly discussed in this post and in a comment by the same author
I can able to post the tweet through my application using C# with twitterizer
I need to be able to post with targets set (country, language, city and
The get works fine and able to post to the database with a test
I have a web page where people are able to post a single number
I would like my iPhone app to be able to post a static message

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.