FacebookService
extends Facebook
in package
Table of Contents
Constants
- ALBUM_TYPE_PROFILE = 'profile'
Properties
- $connectedUser : bool
- $service : mixed
Methods
- __construct() : mixed
- connectUser() : bool|AccessToken
- Connect the user using the facebook api
- disconnectUser() : mixed
- Disconnect the logged user
- getAccessToken() : string
- Get the access token
- getLoginUrl() : mixed
- getService() : FacebookService
- Get the singleton service
- getUser() : GraphUser
- Get the current user
- isUserConnected() : bool
- Test if user is connected with facebook on this app
Constants
ALBUM_TYPE_PROFILE
public
mixed
ALBUM_TYPE_PROFILE
= 'profile'
Properties
$connectedUser
protected
bool
$connectedUser
= null
True only if the use is just connnected
$service
protected
static mixed
$service
Methods
__construct()
public
__construct([array<string|int, mixed> $config = array() ]) : mixed
Parameters
- $config : array<string|int, mixed> = array()
connectUser()
Connect the user using the facebook api
public
connectUser() : bool|AccessToken
Return values
bool|AccessTokendisconnectUser()
Disconnect the logged user
public
disconnectUser() : mixed
Tags
getAccessToken()
Get the access token
public
getAccessToken() : string
Return values
stringgetLoginUrl()
public
getLoginUrl(mixed $redirectUrl[, array<string|int, mixed> $scope = array() ][, mixed $separator = '&' ]) : mixed
Parameters
- $redirectUrl : mixed
- $scope : array<string|int, mixed> = array()
- $separator : mixed = '&'
getService()
Get the singleton service
public
static getService() : FacebookService
Return values
FacebookServicegetUser()
Get the current user
public
getUser([array<string|int, string>|string|null $fields = null ]) : GraphUser
Parameters
- $fields : array<string|int, string>|string|null = null
Return values
GraphUserisUserConnected()
Test if user is connected with facebook on this app
public
isUserConnected() : bool