My Rpi Twit bot


Screen Shot 2014-10-08 at 9.48.32 PM

My Raspberry pi say hi to the world, jadinya kmrn iseng iseng ngikutin tutorial membuat script otomatis ngetweet menggunakan api twitter dan aplikasi twython di rpi, dan akhirnya sukses seperti terlihat digambar hasil postingannya ke twitter, disini tutorialnya

Bahasa pemrograman yang digunakan adalah bahasa phython, berikut script saya

#!/usr/bin/env python

import sys

from twython import Twython

tweetStr = “Ini yasmine test post via raspbrry bot  #rpi #raspberrypi #bot”

# your twitter consumer and access information goes here

# note: these are garbage strings and won’t work

apiKey = ‘isi dengan apikey anda’

apiSecret = ‘isi dengan apisecret anda’

accessToken = ‘access token anda’

accessTokenSecret = ‘access token anda’

api = Twython(apiKey,apiSecret,accessToken,accessTokenSecret)

api.update_status(status=tweetStr)

print “Tweeted: “ + tweetStr

One thought on “My Rpi Twit bot

Ditunggu komennya ...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s