From 42c64b59453e605b745313254686166a9ee1e2d9 Mon Sep 17 00:00:00 2001 From: Ryan Barrett Date: Tue, 12 Aug 2014 17:30:03 -0700 Subject: [PATCH] log warning about Twitter API bug: signin_with_twitter and access_type don't play nice together sigh. background: https://dev.twitter.com/discussions/21281 @Aaron1011, i'm open to doing something stronger about this if you want, e.g. don't allow them both at the same time, or silently disable signin_with_twitter if access_type is set (which isn't as nice). --- tweepy/auth.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tweepy/auth.py b/tweepy/auth.py index e18b71e..4ed5900 100644 --- a/tweepy/auth.py +++ b/tweepy/auth.py @@ -2,6 +2,7 @@ from urllib2 import Request, urlopen import urllib import base64 import json +import logging from tweepy.error import TweepError from tweepy.api import API @@ -65,6 +66,11 @@ class OAuthHandler(AuthHandler): try: if signin_with_twitter: url = self._get_oauth_url('authenticate') + if access_type: + logging.warning( + "Warning! Due to a Twitter API bug, signin_with_twitter " + "and access_type don't always play nice together. Details: " + "https://dev.twitter.com/discussions/21281") else: url = self._get_oauth_url('authorize') self.request_token = self._get_request_token(access_type=access_type) -- 2.25.1