def __init__(self, consumer_key, consumer_secret, callback=None): self._consumer = oauth.OAuthConsumer(consumer_key, consumer_secret) self._sigmethod = oauth.OAuthSignatureMethod_HMAC_SHA1() self.request_token = None self.access_token = None self.callback = callback self.username = None
def __init__(self, consumer_key, consumer_secret, callback=None, secure=True): if type(consumer_key) == unicode: consumer_key = bytes(consumer_key) if type(consumer_secret) == unicode: consumer_secret = bytes(consumer_secret) self._consumer = oauth.OAuthConsumer(consumer_key, consumer_secret) self._sigmethod = oauth.OAuthSignatureMethod_HMAC_SHA1() self.request_token = None self.access_token = None self.callback = callback self.username = None self.secure = secure