I have simple python gtk program which I use on linux.
I would like to implement a "send file to facebook" button.
How can I do this?
I have simple python gtk program which I use on linux.
I would like to implement a "send file to facebook" button.
How can I do this?
Copyright © 2021 Jogjafile Inc.
You are not showing any code, so the question is probably more about whether it is possible. I am pretty sure it is possible.
Facebook has a Python API: https://pypi.python.org/pypi/facebook-sdk
There is an example for photo upload on that page:
It seems you need to also read up on OAuth, and your program might need to have a place where it asks for a username and a password for the Facebook account. Probably you can also say
tags=Noneif you just want to upload the picture.So all you probably need to do is put the above code into a function that accepts a path to a file. I would connect the button to a filechooser-dialog that returns the path to the file and then calls the upload function.