public
Last active

  • Download Gist
TwitterOAuthConnector.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
<?php
$provider = new stdClass;
$provider->disabled = FALSE; /* Edit this to true to make a default provider disabled initially */
$provider->name = 'twitter';
$provider->title = 'Twitter';
$provider->url = 'http://api.twitter.com';
$provider->consumer_advanced = array(
'signature method' => 'HMAC-SHA1',
'request token endpoint' => '/oauth/request_token',
'authorization endpoint' => '/oauth/authenticate',
'access token endpoint' => '/oauth/access_token',
);
$provider->mapping = array(
'fields' => array(
'uid' => array(
'resource' => 'http://api.twitter.com/1/account/verify_credentials.json',
'method post' => 0,
'field' => 'id',
),
'real name' => array(
'resource' => 'http://api.twitter.com/1/account/verify_credentials.json',
'method post' => 0,
'field' => 'name',
),
'avatar' => array(
'resource' => 'http://api.twitter.com/1/account/verify_credentials.json',
'method post' => 0,
'field' => 'profile_image_url',
),
),
'format' => 'json',
);

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.