yf_oauth_driver_facebook class

Fileplugins/oauth/classes/oauth/yf_oauth_driver_facebook.class.php
Use_class('oauth_driver_facebook', 'classes/oauth/')
Extendsyf_oauth_driver2

Public properties

A site sets them in its config with $PROJECT_CONF['oauth_driver_facebook']['NAME'] = ...;

PropertyDefaultDescription
$get_access_token_method 'GET'
$scope ''

Public methods 2

None without a leading underscore.

Methods starting with _ hooks and helpers; not routable as page actions

public function _decode_result($result, $response, $for_method = '')
    public function _decode_result($result, $response, $for_method = '')
    {
        // Force content_type here as facebook return text/plain, but in form urlencoded format
        if ($for_method == 'get_access_token') {
            $response['content_type'] = 'application/x-www-form-urlencoded';
        }
        return parent::_decode_result($result, $response, $for_method);
    }
public function _get_user_info_for_auth($raw = [])
    public function _get_user_info_for_auth($raw = [])
    {
        $user_info = [
            'user_id' => $raw['id'],
            'login' => $raw['email'],
            'name' => $raw['name'],
            'email' => $raw['email'],
            'avatar_url' => '',
            'profile_url' => $raw['link'],
            'locale' => $raw['locale'],
            'timezone' => $raw['timezone'],
            'gender' => $raw['gender'],
        ];
        return $user_info;
    }

Inherited methods

from yf_oauth_driver2: _storage_clean(), _storage_get(), _storage_set(), authorize(), get_access_token(), get_user_info(), login()