Google App Engine/Pythonã§ã¯ã¦ãªOAuth
AppEngine-OAuth-Libraryãæ¡å¼µ
ã¯ã¦ãªãã¤ã¯ã§OAuthããµãã¼ããããã®ã§ãGoogle App Engine/Pythonããå©ç¨ãããã¨æã£ãã®ã§ããã
Twitterã§ãå®ç¸¾ã®ããAppEngine-OAuth-Libraryãå
¨ç¶åãã¾ããã§ããã
å³å¯ãªä»æ§ã«æºæ ãã¦ããªãã£ã½ãã§ãããªã®ã§ãã¯ã¦ãªã§ãåãããã«ä¿®æ£ãã¦ã¿ã¾ããã
以ä¸ããå
¥æã§ãã¾ãã
https://github.com/nikolat/AppEngine-OAuth-Library
注æç¹
ã¯ã¦ãªã§å©ç¨ããéã¯ã¢ã¯ã»ã¹ãã¼ã¯ã³åå¾æã«scopeãã©ã¡ã¼ã¿ãæå®ããªãã¨ããã¾ããã
以ä¸ã®ããã«ç¬¬åå¼æ°ã«æå®ãã¦ãã ãããã³ã¼ã«ããã¯URLã¯å¿
é ã§ãã
import oauth CONSUMER_KEY = 'xxxx' CONSUMER_SECRET = 'xxxx' CALLBACK_URL = 'xxxx' SCOPE = 'read_public,write_public' client = oauth.HatenaClient(CONSUMER_KEY, CONSUMER_SECRET, CALLBACK_URL, scope=SCOPE) redirect_url = client.get_authorization_url()