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

Use json instead of data argument for requests. #334

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

paulbooth
Copy link

json will behave the same as data except in the case of lists, which will now correctly JSON encode the post_args.

Note that since the post_args are created in this library, a consumer cannot simply encode the data as json to be passed to the graph.put_objects call, so this change is necessary to allow access to any facebook API that uses arrays, such as forms which require an array of question objects https://developers.facebook.com/docs/graph-api/reference/page/leadgen_forms/

json will behave the same as data except in the case of
 lists, which will now correctly JSON encode the post_args.
Copy link
Member

@martey martey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a potentially SDK-breaking change, and none of our existing test cases cover this, I would really like to see automated tests included before merging.

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

Successfully merging this pull request may close these issues.

2 participants