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

HTTP 400 on Companies API calls #34

Open
danielbonnell opened this issue Dec 16, 2015 · 1 comment
Open

HTTP 400 on Companies API calls #34

danielbonnell opened this issue Dec 16, 2015 · 1 comment

Comments

@danielbonnell
Copy link

Hello,

I just set up this gem in my app to replace the hexgnu linkedin gem so that I could pull in metrics on posts that my users send out. I'm finding it impossible to access the companies API though. Any time I attempt to call a method for that API, I get an HTTP 400 error. I saw Issue #31 but I don't think that's the problem, as I am an administrator on the pages whose posts I am trying to pull metrics on. Additionally, since upgrading I've lost the ability to create new shares. I've tried the following methods, all of which return 400 errors:

add_company_share
company_updates_comments
company_updates_likes

I wouldn't be surprised if other methods also returned 400 errors. I'm rather desperate to get this to work as my attempts at using other gems to get metrics on company shares have failed. I've also not had any success creating an integration from scratch.

Edit: I also noticed Issue #11, which pertains to add_company_share, but that didn't solve my problem.

Thanks!

@MattRyder
Copy link

I'm logging this here for future use, in case anyone else hits a similar issue, and I'd like to offer up my solution.

Firstly, this gem's logging features are (IMO) impossible, if you're hitting any issues go ahead and drop the faraday logging middleware until you've sussed your issue, it obscures (quite helpful) errors from the LinkedIn API. To do that, you need to comment out raise_error.rb#L16 and connection.rb#L20.

I've also found that if you're trying to do, for instance, api.company(is_admin: true) it'll fail because it actually expects a string value - api.company(is_admin: "true").

Hope some of this helps.

@emorikawa: Man, please support this gem if you can, or put out a request for a maintainer (you've got a good dozen downstream forks, i'm sure some folks can chip in). You've got a great piece of code here, and it's falling by the wayside.

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