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

Cannot use filtering parameters and cannot log request for debugging #545

Open
AlexCppns opened this issue Sep 21, 2016 · 5 comments
Open
Labels

Comments

@AlexCppns
Copy link

AlexCppns commented Sep 21, 2016

Hi there, I am having trouble with request parameters, especially filtering arrays... I also cannot find any way to log the actual request to facebook servers.

The code:

client.get_connections("act_XXXXXXXXX/customaudiences?filtering[0][value]=Client&filtering[0][operator]=CONTAIN&filtering[0][field]=name")

The error:

Koala::Facebook::ClientError: type: OAuthException, code: 100, message: (#100) The parameter filtering[0][operator] is required [HTTP 400]

This works perfectly fine in the graph api explorer...

@AlexCppns
Copy link
Author

I think it crashes specifically on the word operator, is that a reserved word or so?

@AlexCppns
Copy link
Author

I checked with a simple RestClient, the request works fine.

@arsduo
Copy link
Owner

arsduo commented Feb 20, 2017

Thanks for the issue! Apologies for the late response. I appreciate your reproducing it in the Graph API explorer.

I'm guessing it might be an encoding issue — I'll try testing it with the logger level set to debug and see what's produced and compare that to the explorer and fix it. (If you have a chance to test that, that would be awesome.)

@arsduo arsduo added the bugs label Feb 20, 2017
@agnel-waghela
Copy link

@AlexCppns Try this instead

client.get_connections("act_XXXXXXXXX",'customaudiences', { :filtering => [{ :field => 'name', :operator => 'CONTAIN', :value => 'Client' }].to_json })

Let me know if this works.

And for request logging try this -

Koala::Utils.level = Logger::DEBUG

@maahesmahesh
Copy link

maahesmahesh commented Aug 13, 2019

@AlexCppns Try this instead

client.get_connections("act_XXXXXXXXX",'customaudiences', { :filtering => [{ :field => 'name', :operator => 'CONTAIN', :value => 'Client' }].to_json })

Let me know if this works.

And for request logging try this -

Koala::Utils.level = Logger::DEBUG

@agnel-waghela It works perfectly.

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

No branches or pull requests

4 participants