Python API to take GoPro picture and upload to Twitter.
This program can be used to take GoPro pictures and automatically upload it to a Twitter account. The GoPro must be connected via WiFi.
There are three modules:
- gopro.py: Controls GoPro device remotely, setup and download taken photos to local device, all through the Wifi connection.
- twitter.py: Upload ficture files to Twitter.
- herotwitter.py: Joins the previews modules and provides the final funcionality: take photo and upload it to Twitter.
First, download the code:
git clone https://github.com/rodolfosantos/HeroTwitter.git && cd HeroTwitter
Install the following dependencies: requests, wget, and tweepy. Execute this to install them on your machine:
sudo pip install requests
sudo pip install wget
sudo pip install tweepy
Set your Twitter account consumer keys and access tokens, used for OAuth, into twitter.py module:
consumer_key = ''
consumer_secret = ''
access_token = ''
access_token_secret = ''
To use this library, your computer should be connected to Internet via Ethernet, and sould be connected to GoPro via Wifi interface.
Then execute python interpreter into HeroTwitter folder:
$ python
>>> import herotwitter
>>> herotwitter.takePhotoAndUpload("Photo uploaded with https://github.com/rodolfosantos/HeroTwitter")
This project uses semantic versioning.
- Initial release