hexgnu / linkedin

Ruby wrapper for the LinkedIn API
http://rdoc.info/gems/linkedin
MIT License
759 stars 407 forks source link

Invalid XML when posting a network update #238

Closed sharthakmohanty closed 9 years ago

sharthakmohanty commented 10 years ago

client.add_share(company_id,{ comment: comment, content: {title: title, 'submitted-url' => url,'submitted-image-url' => img, description: desc} })

LinkedIn::Errors::GeneralError: (400): Invalid xml {Expected elements 'post-network-update@http://api.linkedin.com/v1 id@http://api.linkedin.com/v1 ad-account@http://api.linkedin.com/v1 comment@http://api.linkedin.com/v1 attribution@http://api.linkedin.com/v1 content@http://api.linkedin.com/v1 mention@http://api.linkedin.com/v1 title@http://api.linkedin.com/v1 private-message@http://api.linkedin.com/v1 share-target-reach@http://api.linkedin.com/v1' instead of 'commented@http://api.linkedin.com/v1' here in element share@http://api.linkedin.com/v1}

hundredwatt commented 9 years ago

@sharthakmohanty Use the add_company_share method to share to a company page. add_share is for a personal profile and does NOT accept a company_id argument