Skip to content

Commit

Permalink
POST parameters should be UTF-8 encoded.
Browse files Browse the repository at this point in the history
  • Loading branch information
selwin authored and nickpack committed Nov 22, 2018
1 parent bb425de commit 53a5518
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions open_facebook/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,10 @@ def _request(cls, url, post_data=None, timeout=REQUEST_TIMEOUT,
extended_timeout = timeout * timeout_mp
response_file = None
encoded_params = encode_params(post_data) if post_data else None
post_string = (urlencode(encoded_params)
post_string = (urlencode(encoded_params).encode('utf-8')
if post_data else None)
try:
start_statsd('facebook.%s' % statsd_path)

try:
response_file = opener.open(
url, post_string, timeout=extended_timeout)
Expand Down

0 comments on commit 53a5518

Please sign in to comment.