gabel/opauth-twitter-proxy

Opauth的Twitter策略

0.3.4 2018-02-13 15:58 UTC

This package is auto-updated.

Last update: 2024-09-08 19:07:39 UTC


README

基于Opauth-OAuth的Opauth的Twitter策略

入门指南

  1. 安装Opauth-Twitter

    cd path_to_opauth/Strategy
    git clone git@github.com:opauth/twitter.git Twitter
  2. https://dev.twitter.com/apps创建Twitter应用

    • 确保输入回调URL,否则回调将被禁止。
      回调URL可以是自定义的,因为Opauth会在OAuth过程中明确提供正确的URL。
    • 在@Anywhere域中注册您的域名。
      Twitter仅允许来自授权域的认证。
  3. 至少配置消费者密钥消费者密钥以配置Opauth-Twitter策略。

  4. 将用户引导到http://path_to_opauth/twitter进行认证

策略配置

必需参数

<?php
'Twitter' => array(
	'key' => 'YOUR CONSUMER KEY',
	'secret' => 'YOUR CONSUMER SECRET'
)

有关可选参数,请参阅Twitter.php。

Opauth-Twitter默认实现使用Twitter登录
如果您希望进行3方OAuth,请显式地将authenticate_url参数添加到策略配置中,并将其设置为https://api.twitter.com/oauth/authorize

依赖

tmhOAuth需要hash_hmac和cURL。
hash_hmac在PHP 5 >= 5.1.2上可用。

参考

许可证

Opauth-Twitter采用MIT许可证
版权 © 2012 U-Zyn Chua (http://uzyn.com)

tmhOAuth采用Apache 2许可证。