On Sina Weibo's Python site, the app uses a credential to search for more than two oau22, why? Today, I used a python parser to write a sentence. In the next half, the author of Weibo's PythonSDK sent a private message to me (I have asked me about it), and the SDK was upgraded to version 1.0.9, and then click again... I have been the root of the http://blog.csdn.net/chenggong2dm/article/details/6613582 knock on the ten lines of the core of the agent, use the new SDK to buy the line on behalf of the agent to get started... the following shows the basic Token Generation. [Python] #! /Usr/bin/python #-*-coding: UTF-8-*-# handlers. py import web import setting from weibo import APIClient from jinja2 import Environment, FileSystemLoader env = Environment (loader = FileSystemLoader ('templates') class Redirect: def GET (self): web. found ('/') class Index: def GET (self): return env.get_template('goto_sina.html '). render () def POST (self): # oau2c = APIClient (setting. _ APP_KEY, se Invalid. _ APP_SECRET) data = c. parse_signed_request (web. data (). split ("=") [1]) if 'auth _ token' not in data: return env.get_template('unoauth.html '). render () c. set_access_token (data ['oss _ token'], data ['expires _ in']) sended = not 'rerror _ Code' in c. statuses. update. post (status = u'post Weibo ') return sended [python] # index. wsgi import sae import web from handlers import * #404 & 500 def notfound (): return Web. notfound ("Sorry, the page you were looking for was not found. ") def internalerror (): return web. internalerror ("Bad, bad server. no donut for you. ") # url settings urls = ('/? ', 'Index ','/. + ', 'redirect',) app = web. application (urls, globals () app. notfound = notfound # app. internalerror = internalerror application = sae. create_wsgi_app (app. wsgifunc () unoauth.html [html] <! Doctype html>