gabel / opauth-twitter-proxy
Opauth的Twitter策略
0.3.4
2018-02-13 15:58 UTC
Requires
- php: >=5.2.0
- opauth/opauth: >=0.2.0
README
基于Opauth-OAuth的Opauth的Twitter策略
入门指南
-
安装Opauth-Twitter
cd path_to_opauth/Strategy git clone git@github.com:opauth/twitter.git Twitter
-
在https://dev.twitter.com/apps创建Twitter应用
- 确保输入回调URL,否则回调将被禁止。
回调URL可以是自定义的,因为Opauth会在OAuth过程中明确提供正确的URL。 - 在@Anywhere域中注册您的域名。
Twitter仅允许来自授权域的认证。
- 确保输入回调URL,否则回调将被禁止。
-
至少配置
消费者密钥
和消费者密钥
以配置Opauth-Twitter策略。 -
将用户引导到
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许可证。