问题
I am trying to use linkedin API for sharing my web site post on linkedIn.
While making an rest api call to linkedin, I am gettting below error:
{ "errorCode": 0, "message": "Invalid arguments: {S_400_BAD_REQUEST=Bad request}", "status": 400, }
I am getting invalid arguments error. However, I am passing all the required arguments as described in LinkedIn documentation.
Please help if anyone faced and resolved above error.
Thanks!!
回答1:
I ditched the rest api and used the js api, it was much easier. I coded almost exactly what you are trying to code, so it could help you greatly. You can find it here: https://github.com/kaburkett/LinkedIn-Advanced-Share
回答2:
To share on LinkedIn, all you need is:
https://www.linkedin.com/sharing/share-offsite/?url={url}
Source: Microsoft LinkedIn Share URL Documentation.
For example, this works for me:
https://www.linkedin.com/sharing/share-offsite/?url=http://www.wikipedia.org/
Works fine:
Just make your own button, stylize it, and hyperlink it. No need for a plugin or SDK or jslib bundle or whatever.
If you are interested in a regularly maintained GitHub project that keeps track of this so you don't have to, check it out! Social Share URLs
来源:https://stackoverflow.com/questions/35561578/implementing-linkedin-share-api