Pyhton 3.11.2 on Debian, was getting constant 400 when trying to do anything, e.g.
400 Client Error: Bad Request for url: https://graph.facebook.com/v20.0/12345678/messages
Turned out to be because the requests.post()
parameter should be named json
not data
i.e.
response = requests.post(
url, json=data, headers=headers, timeout=10
) # 10 seconds timeout as an example
Sorry don't have time to do a PR for this :(