Hi there, great post, I really enjoyed reading it.
I had a small problem replying messages.
The line #14
requests.post("https://graph.facebook.com/v2.6/me/messages?access_token=" + ACCESS_TOKEN, json=data)
does not work in my case, it seems like python requests module that I am using does not have keyword arg json, also, the request made must contain a Content-Type:Application/json header
other wise, an error reminding request parameter recipient is missing is returned from facebook
this one works
import json
resp = requests.post("https://graph.facebook.com/v2.6/me/messages?access_token=" + ACCESS_TOKEN, data=json.dumps(data), headers={'Content-Type':'Application/json'})
Hope it helps anyone else reading it.
Hi there, great post, I really enjoyed reading it.
I had a small problem replying messages.
The line #14
requests.post("https://graph.facebook.com/v2.6/me/messages?access_token=" + ACCESS_TOKEN, json=data)does not work in my case, it seems like python
requestsmodule that I am using does not have keyword argjson, also, the request made must contain aContent-Type:Application/jsonheaderother wise, an error reminding request parameter
recipientis missing is returned from facebookthis one works
Hope it helps anyone else reading it.