ゼロと無限の間に

フリーでオープンソースなJavaScriptとかPHPとか。

ユーザ用ツール

サイト用ツール


python-box:appengine-oauth

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
python-box:appengine-oauth [2017/05/13 05:39] – [AppEngine-OAuthのソースコード] dgbadminpython-box:appengine-oauth [2017/05/13 05:54] (現在) – [その4. TwitterにOAuthでログインしてTwitter APIを使うデモ] dgbadmin
行 63: 行 63:
 ''' '''
  
 +import json
 import logging import logging
-import wsgiref.handlers+import webapp2
 from appengine_twitter import AppEngineTwitter from appengine_twitter import AppEngineTwitter
 from basehandler import BaseHandler, h from basehandler import BaseHandler, h
-from django.utils import simplejson 
 from google.appengine.ext import db from google.appengine.ext import db
-from google.appengine.ext import webapp 
  
  
行 135: 行 134:
     # ここまで来ればOAuthを使ってAPIが使える。試しにユーザー名を取得     # ここまで来ればOAuthを使ってAPIが使える。試しにユーザー名を取得
     twitter.verify()     twitter.verify()
-    name = simplejson.loads(twitter.last_response.content)['screen_name']+    name = json.loads(twitter.last_response.content)['screen_name']
  
     self.demo_header()     self.demo_header()
行 176: 行 175:
 routing = [('/oauth/', InitHandler), routing = [('/oauth/', InitHandler),
            ('/oauth/callback', CallbackHandler)]            ('/oauth/callback', CallbackHandler)]
-application = webapp.WSGIApplication(routing, debug=False+application = webapp2.WSGIApplication(routing, debug=False)
-wsgiref.handlers.CGIHandler().run(application)+
 </code> </code>
  
行 196: 行 194:
  
 __author__ = 'dgbadmin@gmail.com' __author__ = 'dgbadmin@gmail.com'
-__version__ = '0.2.0'+__version__ = '0.1.1'
  
  
python-box/appengine-oauth.1494621557.txt.gz · 最終更新: 2017/05/13 05:39 by dgbadmin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki