我想通過Python從Foursquare API獲取訪問令牌。Foursquare API Python訪問令牌錯誤
我使用的包裝從https://github.com/mLewisLogic/foursquare 而且,隨後於http://log.hckr.org/2012/02/01/foursquare-api-wrapper-for-python
提到的相同方法,但,對於access_token = client.oauth.get_token('XX_CODE_RETURNED_IN_REDIRECT_XX')
。我收到以下錯誤
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Python27\lib\site-packages\foursquare\__init__.py", line 135, in get_token
response = _request_with_retry(url)
File "C:\Python27\lib\site-packages\foursquare\__init__.py", line 707, in _request_with_retry
return _process_request_with_httplib2(url, data)
File "C:\Python27\lib\site-packages\foursquare\__init__.py", line 733, in _process_request_with_httplib2
raise FoursquareException(u'Error connecting with foursquare API')
FoursquareException: Error connecting with foursquare API
我不知道如果錯誤是因爲使用httplib2庫或其他什麼東西的!
任何人有任何解決方案?
能在你身邊張貼更多的代碼這個調用嗎?可以肯定的是,你實際上傳入了代碼(可以作爲查詢字符串參數),而不是字符串「XX_CO DE_RETURNED_IN_REDIRECT_XX'',對嗎? – octopi 2013-03-05 23:28:16
@octopi我已經嘗試了http://log.hckr.org/2012/02/01/foursquare-api-wrapper-for-python – Zero 2013-03-12 18:04:51
上提到的代碼實際記錄的錯誤是什麼? – 2013-06-26 18:03:45