Comments (3)
There are extra brackets inside recipient.
from pymessenger.
I had that same problem. But even when I fixed it by removing the extra brackets, was the MultipartEncoder that broke...
I had to cast every dict to a string inside the payload to actually get the request to be sent.
My payload looks like this now:
payload = {
'recipient': str({
'id': recipient_id
}),
'notification_type': str(notification_type),
'message': str({
'attachment': {
'type': attachment_type,
'payload': {}
}
}),
'filedata': (os.path.basename(attachment_path), open(attachment_path, 'rb'))
}
But still, the Graph API refuses resquest by sending this error message:
{
'error':{
'fbtrace_id':'Fp69bNu5ULJ',
'type':'GraphMethodException',
'message':'Unsupported post request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api',
'code':100
}
}
Now I don't know what step to take next... can you guys help me?
from pymessenger.
I've found the error. The upload file request must call https://graph.facebook.com/v2.6/me/messages?access_token=ACCESS_TOKEN and was calling https://graph.facebook.com/v2.6.
I've created a pull request #31
from pymessenger.
Related Issues (20)
- AttributeError: 'Bot' object has no attribute 'send_quickreply' HOT 1
- is this possible to accept a response from other user ??
- sometime why it's giving replay 2-3 times ? HOT 1
- NON_PROMOTIONAL_SUBSCRIPTION HOT 1
- default raise TypeError(repr(o) + " is not JSON serializable")
- How to use send_button_message? HOT 1
- No get_user_info in bot.py HOT 1
- Is there a way to send messages to multiple users (broadcast a message) at once rather than iterating over each user? HOT 1
- How to get attachment URL HOT 1
- how to use set_get_started method? HOT 2
- PyPi not updated
- Cannot message users who are not admins, developers or testers of the app until pages_messaging permission is reviewed and the app is live HOT 2
- Facebook Messenger (Python) two different results same user HOT 1
- get_user_info does not work with requests module properly HOT 1
- how can i handle postback on persistent menu?
- Needs Support for message types and message tags.
- Fork for this repo HOT 1
- Can we use Receipt Messages in this version?
- Message failed to send because another app is controlling this thread now HOT 1
- New Framework py-messenger
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pymessenger.