IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    Django开发中整合新浪微博API

    余争的个人页面发表于 2013-09-18 09:19:26
    love 0

    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



沪ICP备19023445号-2号
友情链接