Last active
December 14, 2015 22:29
-
-
Save gregimba/5158966 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
twitter==1.10.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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