Skip to content

Instantly share code, notes, and snippets.

@gregimba
Last active December 14, 2015 22:29
Show Gist options
  • Save gregimba/5158966 to your computer and use it in GitHub Desktop.
Save gregimba/5158966 to your computer and use it in GitHub Desktop.
from twitter import *
from Tkinter import *
OAUTH_TOKEN = ""
OAUTH_SECRET = ""
CONSUMER_KEY = ""
CONSUMER_SECRET = ""
twitter = Twitter(
auth=OAuth(OAUTH_TOKEN, OAUTH_SECRET,
CONSUMER_KEY, CONSUMER_SECRET)
)
class App:
def __init__(self, master):
frame = Frame(master)
frame.pack()
self.button = Button(frame, text="QUIT", fg="red", command=frame.quit)
self.button.pack(side=LEFT)
self.Tweet = Button(frame, text="Tweet", command=self.tweet)
self.Tweet.pack(side=LEFT)
def tweet(self):
twitter.statuses.update(status="Hey Guys, Good Times are coming to an end")
root = Tk()
app = App(root)
root.mainloop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment