yf_oauth_driver_twitter class| File | plugins/oauth/classes/oauth/yf_oauth_driver_twitter.class.php |
|---|---|
| Use | _class('oauth_driver_twitter', 'classes/oauth/') |
| Extends | yf_oauth_driver1 → yf_oauth_driver2 |
A site sets them in its config with $PROJECT_CONF['oauth_driver_twitter']['NAME'] = ...;
| Property | Default | Description |
|---|---|---|
$header_add_realm |
false |
|
$url_params_authorize |
['oauth_callback' => null] |
None without a leading underscore.
_ hooks and helpers; not routable as page actionspublic function _get_user_info_for_auth($raw = [])
public function _get_user_info_for_auth($raw = [])
{
$user_info = [
'user_id' => $raw[0]['id'],
'login' => $raw[0]['screen_name'],
'name' => $raw[0]['name'],
'avatar_url' => $raw[0]['profile_image_url'],
'profile_url' => 'https://twitter.com/' . $raw[0]['screen_name'], // Can be empty
];
return $user_info;
}
from yf_oauth_driver2: _decode_result(), _storage_clean(), _storage_get(), _storage_set(), login()
from yf_oauth_driver1: _do_sign_request(), _encode(), _get_oauth_header(), _hmac_sha1(), authenticate(), authorize(), get_access_token(), get_user_info()