我正在使用 LinkedIn API gem 运行 Rails 3:这里
我一直无法让 Share API 像这里描述的那样工作
这工作正常:
response = client.add_share(:comment => 'new share API')
这失败了:
response = client.add_share(:comment => 'new share API', :title => 'Linkedin Share API', :url => 'http://developer.linkedin.com/docs/DOC-1212', :image_url => 'http://images.bizjournals.com/travel/cityscapes/thumbs/sm_sanfrancisco.jpg')
错误:
LinkedIn::Errors::GeneralError ((400): Invalid xml {Expected elements 'post-network-update@http://api.linkedin.com/v1 id@http://api.linkedin.com/v1 visibility@http://api.linkedin.com/v1 comment@http://api.linkedin.com/v1 attribution@http://api.linkedin.com/v1 content@http://api.linkedin.com/v1 private-message@http://api.linkedin.com/v1 share-target-reach@http://api.linkedin.com/v1' instead of 'image-url@http://api.linkedin.com/v1' here in element share@http://api.linkedin.com/v1, Expected elements 'post-network-update@http://api.linkedin.com/v1 id@http://api.linkedin.com/v1 attribution@http://api.linkedin.com/v1 content@http://api.linkedin.com/v1 private-message@http://api.linkedin.com/v1 share-target-reach@http://api.linkedin.com/v1' instead of 'url@http://api.linkedin.com/v1' here in element share@http://api.linkedin.com/v1}):
有任何想法吗?谢谢