I am getting this error on hitting the /events
endpoint (POST REQUEST) to upload event. The URL I am hitting is https://graph.facebook.com/v3.2/<EVENT_ID>/events
with payload something like this:
{'upload_tag': <TIMESTAMP>, 'data': [{'currency': 'USD', 'event_time': <TIMESTAMP>, 'value': 0.0, 'match_key': {'email': '<EMAIL_HASH>'}, 'custom_data': {'event_source': 'event'}}], 'access_token': '<ACCESS_TOKEN>'}
But am getting the error that params must be an array which it already is. Any help would be appreciated.
2
Answers
The data parameter accepts only JSON string, convert the data to json.dumps(object) and do an HTTP post.
your payload should really be like this