some tweaks for auth stuff

workspace
Brendan Howell 8 years ago
parent 1783913028
commit 6ec91abd1b

@ -1,4 +1,6 @@
import codecs
import html import html
import os.path
import textwrap import textwrap
import urllib import urllib
@ -26,13 +28,23 @@ class PublicRelations(Bureau):
def __init__(self): def __init__(self):
Bureau.__init__(self) Bureau.__init__(self)
self.auth = twitter.OAuth(
"423391766-bhjHwzD1eJfxB9s7ZvmeHReNVJM0d93kJ8KSrHEZ", CK = codecs.decode("arI4UCnfMeKZwAnyvJJIHVnUN",
"qSvSYMs4lpSKbZtiuOjB1Gon5rzye8whvadcOdDpFocwa", "rot13")
"arI4UCnfMeKZwAnyvJJIHVnUN", CS = codecs.decode("ntegmiu3rdFAyMczCWM0bgpydFHwYXV3WedhtPCec1Pu9qdfGy",
"agrtzvh3eqSNlZpmPJZ0otclqSUjLKI3JrqugCPrp1Ch9dqsTl") "rot13")
TW_CREDS = os.path.expanduser('~/.screenless/tw_creds')
if not os.path.exists(TW_CREDS):
twitter.oauth_dance("The Screenless Office", CK, CS,
TW_CREDS)
oauth_token, oauth_secret = twitter.read_token_file(TW_CREDS)
self.t = TWrapper() self.t = TWrapper()
self.t.t = twitter.Twitter(auth=self.auth) self.t.t = twitter.Twitter(auth=twitter.OAuth(oauth_token, oauth_secret,
CK, CS))
@add_command("tweetpic", "Post a Document Camera Image to Twitter") @add_command("tweetpic", "Post a Document Camera Image to Twitter")
def tweet_pic(self): def tweet_pic(self):

Loading…
Cancel
Save