Monday, January 30, 2017

Tweet from Raspberry Pi - Raspbian OS


Install and configure components

sudo apt-get install python-pip
sudo pip install twython
sudo pip install requests requests_oauthlib

Python Code:

from twython import Twython

APP_KEY=' '
APP_SECRET=''
OAUTH_TOKEN=''
OAUTH_TOKEN_SECRET=''

twitter = Twython(APP_KEY,APP_SECRET,OAUTH_TOKEN,OAUTH_TOKEN_SECRET)

strTweet = 'Hi..!!'
twitter.update_status(status=strTweet)

1 comment:

  1. Thanks for giving the information it is useful for me.
    Crafsol develop the mobile application for mobile devices by using the SAP technology.
    Enterprise Mobility

    ReplyDelete