Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add share 400 error #40

Open
stambe opened this issue Feb 19, 2018 · 1 comment
Open

add share 400 error #40

stambe opened this issue Feb 19, 2018 · 1 comment

Comments

@stambe
Copy link

stambe commented Feb 19, 2018

Following code is throwing 400 error, because linkedin want data in Json format. I guess this code is updated but not yet published on rubygem. Are you going to publish these changes on rubygem or you are not supporting this gem now?

require 'linkedin-oauth2'

access_token = "<TOKEN_VALUE>"

api = LinkedIn::API.new(access_token)

api.add_share({comment: "hi access token"})

Thanks in advance.

@anirbanmu
Copy link

anirbanmu commented Jul 26, 2018

I believe I'm hitting this as well with the add_company_share method. It seems the request is being sent as application/x-www-form-urlencoded but it needs to be application/json with the JSON payload as the body.

As said in the above comment, it seems fixed already but new version of gem hasn't been published?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants