OAuth

Extends \Joomla\OAuth2\Client

Joomla Framework class for generating Facebook API access token.

deprecated
since

1.0

deprecated

The joomla/facebook package is deprecated

Methods

__construct

Constructor.

__construct(array $options = array(), \Joomla\Http\Http $http, \Joomla\Input\Input $input, \Joomla\Application\AbstractWebApplication $application = null) 
inherited
since

1.0

Arguments

$options

arrayOAuth2 Client options object

$http

\Joomla\Http\HttpThe HTTP client object

$input

\Joomla\Input\InputThe input object

$application

\Joomla\Application\AbstractWebApplicationThe application object

authenticate

Get the access token or redirect to the authentication URL.

authenticate() : string
inherited
since

1.0

throws

\RuntimeException

Response

stringThe access token

createUrl

Create the URL for authentication.

createUrl() : \Joomla\Http\Response
inherited
since

1.0

throws

\InvalidArgumentException

Response

\Joomla\Http\ResponseThe HTTP response

getOption

Get an option from the OAuth2 Client instance.

getOption(string $key) : mixed
inherited
since

1.0

Arguments

$key

stringThe name of the option to get

Response

mixedThe option value

getScope

Method to get the current scope

getScope() : string
since

1.0

Response

stringComma separated list of permissions.

getToken

Get the access token from the Client instance.

getToken() : array
inherited
since

1.0

Response

arrayThe access token

isAuthenticated

Verify if the client has been authenticated

isAuthenticated() : boolean
inherited
since

1.0

Response

booleanIs authenticated

query

Send a signed Oauth request.

query(string $url, mixed $data = null, array $headers = array(), string $method = 'get', integer $timeout = null) : string
inherited
since

1.0

throws

\InvalidArgumentException

\RuntimeException

Arguments

$url

stringThe URL forf the request.

$data

mixedThe data to include in the request

$headers

arrayThe headers to send with the request

$method

stringThe method with which to send the request

$timeout

integerThe timeout for the request

Response

stringThe URL.

refreshToken

Refresh the access token instance.

refreshToken(string $token = null) : array
inherited
since

1.0

throws

\Exception

\RuntimeException

Arguments

$token

stringThe refresh token

Response

arrayThe new access token

setOption

Set an option for the OAuth2 Client instance.

setOption(string $key, mixed $value) : \Joomla\OAuth2\Client
inherited
since

1.0

Arguments

$key

stringThe name of the option to set

$value

mixedThe option value to set

Response

\Joomla\OAuth2\ClientThis object for method chaining

setScope

Method used to set permissions.

setScope(string $scope) : \Joomla\Facebook\OAuth
since

1.0

Arguments

$scope

stringComma separated list of permissions.

Response

\Joomla\Facebook\OAuthThis object for method chaining

setToken

Set an option for the Client instance.

setToken(array $value) : \Joomla\OAuth2\Client
inherited
since

1.0

Arguments

$value

arrayThe access token

Response

\Joomla\OAuth2\ClientThis object for method chaining

Properties

options

Options for the Client object.

inherited
since

1.0

Type(s)

array

http

The HTTP client object to use in sending HTTP requests.

inherited
since

1.0

Type(s)

\Joomla\Http\Http

input

The input object to use in retrieving GET/POST data.

inherited
since

1.0

Type(s)

\Joomla\Input\Input

application

The application object to send HTTP headers for redirects.

inherited