Skip to content

Commit

Permalink
testing weibo api
Browse files Browse the repository at this point in the history
  • Loading branch information
heisaman committed Aug 31, 2016
1 parent d2e51f3 commit 9384762
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hello.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello_world():
return 'Hello, World!'
19 changes: 19 additions & 0 deletions weibo_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from weibo import Client

APP_KEY = '1521216146' # app key
APP_SECRET = '212c28b62505183820922d0f4f45e327' # app secret
CALLBACK_URL = 'http://heisaman.xyz/callback' # callback url

c = Client(APP_KEY, APP_SECRET, CALLBACK_URL)
print c.authorize_url
"""
c.set_code('3e96eb50a8a19fbc0cf0aa0423fb8601')
token = c.token
print token
# {u'access_token': u'2.001psIGCSorweBd556e626159iQzBB', u'remind_in': u'157679999', u'uid': u'1923041062', u'expires_at': 1629809571}
c2 = Client(APP_KEY, APP_SECRET, CALLBACK_URL, token)
c2.get('users/show', uid=2703275934)
c2.get('account/rate_limit_status')
c2.get('favorites')
"""

0 comments on commit 9384762

Please sign in to comment.