Twitter strategy for Opauth, based on Opauth-OAuth.
Install Opauth-Twitter:
cd path_to_opauth/Strategy
git clone git@github.com:opauth/twitter.git Twitter
or
composer require opauth/twitter
Create Twitter application at https://dev.twitter.com/apps
Configure Opauth-Twitter strategy with at least Consumer key
and Consumer secret
.
Direct user to http://path_to_opauth/twitter
to authenticate
Required parameters:
<?php
'Twitter' => array(
'key' => 'YOUR CONSUMER KEY',
'secret' => 'YOUR CONSUMER SECRET'
)
See Twitter.php for optional parameters.
Opauth-Twitter does "Sign In with Twitter" by default.
If you prefer to do a 3-legged OAuth, explicitly add authenticate_url
parameter to strategy configuration and set it to https://api.twitter.com/oauth/authorize
.
tmhOAuth requires hash_hmac and cURL.
hash_hmac is available on PHP 5 >= 5.1.2.
Opauth-Twitter is MIT Licensed
Copyright © 2012 U-Zyn Chua (http://uzyn.com)
tmhOAuth is Apache 2 licensed.