Results 1 to 5 of 5

Thread: LinkedIn createNetworkUpdate "405 Method Not Allowed" error

  1. #1
    Join Date
    Feb 2012
    Posts
    3

    Default LinkedIn createNetworkUpdate "405 Method Not Allowed" error

    Hi,
    I am getting the following error when I trying to create a Network update using LinkedIn Module. Have any idea why it is occuring? Thanks.

    WARN [org.springframework.web.client.RestTemplate] PUT request for "https://api.linkedin.com/v1/people/~/person-activities" resulted in 405 (Method Not Allowed); invoking error handler
    ERROR [com.direxxis.dmedge.batch.socialmedia.SocialMediaP osterTest] org.springframework.web.client.HttpClientErrorExce ption: 405 Method Not Allowed

    My code is below

    final LinkedIn linkedin = linkedin(userName);
    linkedin.networkUpdateOperations().createNetworkUp date(message);

    Using 1.0.1.BUILD-20111215.091643-8 version of LinkedIn Module.

  2. #2
    Join Date
    Feb 2012
    Posts
    3

    Default

    I tried sharing with network and I get the following error.

    WARN [org.springframework.web.client.RestTemplate] POST request for "https://api.linkedin.com/v1/people/~/shares" resulted in 400 (Bad Request); invoking error handler
    ERROR [com.direxxis.dmedge.batch.socialmedia.SocialMediaP osterTest] org.springframework.web.client.HttpClientErrorExce ption: 400 Bad Request


    My code:

    NewShare share = new NewShare();
    share.setComment("mycomment");
    NewShareContent content = new NewShareContent();
    content.setTitle("My Content Title");
    share.setContent(content);
    linkedin.networkUpdateOperations().share(share);

  3. #3
    Join Date
    Oct 2008
    Posts
    26

    Default

    I'm receiving the same error and, as far as I can see, LinkedIn requires a POST request for this kind of operation while NetworkUpdateTemplate.createNetworkUpdate uses PUT, see: post-network-update

    Did anyone succeed in creating a network update via Spring-Social?
    (I'm using 1.1.0.M1 with spring-social-linkedin 1.0.0.RC1)

  4. #4
    Join Date
    Aug 2004
    Posts
    1,074

    Default

    See my response to this same question in the other forum post you commented in.
    Craig Walls
    Spring Social Project Lead

  5. #5
    Join Date
    Oct 2008
    Posts
    26

    Default

    I've created https://jira.springsource.org/browse/SOCIALLI-21 and a pull request on github (though this is only one line code).

    BTW., is there an official SpringSource code style to use with IntelliJ?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •