Django开发中整合新浪微博API

原创
2013/09/18 09:19
阅读数 449

1.django-social-auth

https://pypi.python.org/pypi/django-social-auth

依赖于更好的项目:https://github.com/omab/python-social-auth

http://django-social-auth.readthedocs.org/en/latest/configuration.html

http://pyblog.ceshine.net/post/9/%E7%94%A8%E6%96%B0%E6%B5%AA%E5%BE%AE%E5%8D%9A%E5%B8%B3%E6%88%B6%E7%99%BB%E5%85%A5%E4%BD%A0%E7%9A%84django%E7%B6%B2%E7%AB%99/

http://c2journal.com/2013/01/24/social-logins-with-django/

方法:

INSTALLED_APPS = (

    'social_auth',

)

#WEIBO_CONSUMER_KEY = 'xxx'
#WEIBO_CONSUMER_SECRET= 'xxx'
WEIBO_KEY = 'xxx'
WEIBO_SECRET = 'xxx'
SOCIAL_AUTH_COMPLETE_URL_NAME  = 'complete'
SOCIAL_AUTH_ASSOCIATE_URL_NAME = 'associate_complete'
AUTHENTICATION_BACKENDS = (
    'social_auth.backends.contrib.weibo.WeiboBackend',
    'django.contrib.auth.backends.ModelBackend',
)

url.py

urlpatterns=patterns('',
    ...
    url(r'', include('social_auth.urls')),
    ...
)

2. https://pypi.python.org/pypi/weibo/0.1.2

3. http://qinxuye.me/article/sina-weibo-api-in-developing-diango/

4.多说

https://github.com/duoshuo/duoshuo-python-sdk

http://frellica.sinaapp.com/?p=72

展开阅读全文
打赏
0
4 收藏
分享
加载中
更多评论
打赏
0 评论
4 收藏
0
分享
返回顶部
顶部