File: weibo.rst

package info (click to toggle)
python-social-auth 0.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,828 kB
  • ctags: 3,245
  • sloc: python: 12,867; makefile: 119; sh: 3
file content (23 lines) | stat: -rw-r--r-- 708 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Weibo OAuth
===========

Weibo OAuth 2.0 workflow.

- Register a new application at Weibo_.

- Fill ``Consumer Key`` and ``Consumer Secret`` values in the settings::

      SOCIAL_AUTH_WEIBO_KEY = ''
      SOCIAL_AUTH_WEIBO_SECRET = ''

By default ``account id``, ``profile_image_url`` and ``gender`` are stored in
extra_data field.

The user name is used by default to build the user instance ``username``,
sometimes this contains non-ASCII characters which might not be desirable for
the website. To avoid this issue it's possible to use the Weibo ``domain``
which will be inside the ASCII range by defining this setting::

    SOCIAL_AUTH_WEIBO_DOMAIN_AS_USERNAME = True

.. _Weibo: http://open.weibo.com