# Plugin di accesso a Weibo / Plugin di login a 微博

**URL:** <https://meta.discourse.org/t/weibo-login-plugin/19735>\
**Category:** Plugin\
**Tags:** broken\
**Created:** [7 Settembre 2014, 1:32am UTC](https://meta.discourse.org/t/weibo-login-plugin/19735 "2014-09-07T01:32:30Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![fantasticfears](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fantasticfears/32/119608_2.png) [@fantasticfears](https://meta.discourse.org/u/fantasticfears)\
**Post date:** [7 Settembre 2014, 1:32am UTC](https://meta.discourse.org/t/weibo-login-plugin/19735/1 "2014-09-07T01:32:30Z")

</div>

It’s a oauth2 strategy for [Sina Weibo](http://weibo.com).

[https://github.com/fantasticfears/weibo-login](https://github.com/fantasticfears/weibo-login)

Authenticate with discourse with Weibo.

通过微博登陆 Discourse。

## Register Client Key & Secert / 申请微博接入

1. 登录[微博开发者中心](http://open.weibo.com/connect?bottomnav=1&wvr=5)，注册填写相关信息。
2. 点击`开始接入`。
3. 填写相关信息。`网站域名`可填写根域名或者具体域名。如图所示。（验证所需要的标签可在 Discourse 设置中插入，验证后即可删除；访问 Discourse 管理面板 - 内容 - 页面顶部）
4. 在申请到的后台找到`网站信息`的`基本信息`一栏，获得`key`和`secret`，将其填入Discourse 设置中。

 ![](https://global.discourse-cdn.com/meta/original/3X/6/2/628fedd738a4b47d54395c6e5e4e9217fb7088f9.png)

## Installation / 安装

### Docker 安装

在 `app.yml` 的

```
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - mkdir -p plugins
          - git clone https://github.com/discourse/docker_manager.git

```

最后一行 `- git clone https://github.com/discourse/docker_manager.git` 后添加：

```
- git clone https://github.com/fantasticfears/weibo-login.git

```

### Manual / 手动安装

Run `rake plugin:install repo=https://github.com/fantasticfears/weibo-login` in your discourse directory

In development mode, run `rake assets:clean`

In production, recompile your assets: `rake assets:precompile`

在您 Discourse 目录中运行 `rake plugin:install repo=https://github.com/fantasticfears/weibo-login`

在开发者模式下，运行 `rake assets:clean`

在生产模式下，重编译 assets `rake assets:precompile`

## Usage / 使用

Go to Site Settings’s login category, fill in the client id and client secret.

进入站点设置的登录分类，填写 client id 和 client serect。

## Issue / 问题

Visit [topic on Discourse Meta](https://meta.discourse.org/t/weibo-login-plugin/19735) or [GitHub Issues](https://github.com/fantasticfears/weibo-login/issues).

访问[Discourse Meta上的主题](https://meta.discourse.org/t/weibo-login-plugin/19735)或[GitHub Issues](https://github.com/fantasticfears/weibo-login/issues)。

 ![](https://global.discourse-cdn.com/meta/original/3X/0/c/0c2c152761b90345ea8ee4b9f2ecd7c64ac78ca3.png)

 ![](https://global.discourse-cdn.com/meta/original/3X/a/e/ae74b476ae589439b7beeb41aa8a9e4799220830.png)

 ![](https://global.discourse-cdn.com/meta/original/3X/7/4/748c554714946bfc0240e8d33e3f18f9ca9a12a1.png)

---

_[View the full topic](https://meta.discourse.org/t/weibo-login-plugin/19735)._
