Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to send local file? #85

Open
master0v opened this issue Apr 28, 2022 · 2 comments
Open

Is there a way to send local file? #85

master0v opened this issue Apr 28, 2022 · 2 comments

Comments

@master0v
Copy link

Would you like assistance or advice?

advice

Issue description

Would like to send a file from a local filesystem.

file = attachments.File(url="file://./file.txt")
client.send(file.to_dict(), recipient_id=user_id, messaging_type='RESPONSE')

Steps to reproduce

the above code returns "(#100) file://./file.txt should represent a valid URL)"
also tried other variations of file:// syntax as well as simply ./file.txt and file.txt

Traceback or other info

  • fbmessenger version: master@commit
  • python version: 3.7
  • Facebook Messenger API version: 13

Thanks!

@master0v
Copy link
Author

according to this doc, the API supports it https://developers.facebook.com/docs/messenger-platform/reference/attachment-upload-api/

@gaetan1903
Copy link

this repository seems to be no longer maintained.

you can try the framework Ampalibe for creating bot messenger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants