\FacebookAPIExtension
Synopsis
class FacebookAPIExtension
extends Extension
{
- // members
- protected array|null $facebookPermissionsGranted = NULL;
- // methods
- public void onBeforeInit()
- public void onAfterInit()
- public void initFacebook()
- public boolean requestFacebookPermissions()
- public string getFacebookLoginURL()
- public void redirectClient()
- protected array parsePermissions()
- public void clearDeniedFacebookPermissions()
- public void getDeniedFacebookPermissions()
- public string checkFacebookPermission()
- public void setDeniedFacebookPermissions()
- public void denyFacebookPermissions()
- public array getGrantedFacebookPermissions()
- public array updateGrantedFacebookPermissions()
- public array determineUngrantedFacebookPermissions()
Hierarchy
Extends
- Extension
Members
protected
- $facebookPermissionsGranted
—
array|null
Local per-request cache of approved permissions This value should not change within a single request
Methods
protected
- parsePermissions() — Parses the specified permission list
public
- checkFacebookPermission() — Checks the status of a single permission
- clearDeniedFacebookPermissions()
- denyFacebookPermissions() — Marks the following additional permissions as denied. Does not affect already denied permissions
- determineUngrantedFacebookPermissions() — Determine if all of the specified permissions are granted
- getDeniedFacebookPermissions() — Retrieves the list of all facebook permissions requested, but not yet authorised. Any requested permission that has not yet been approved should be treated as denied
- getFacebookLoginURL() — Calculates the url users should be redirected to in order to authenticate for this application.
- getGrantedFacebookPermissions() — Retrieves the list of all authorised permissions for the current user
- initFacebook() — Initialises the facebook API and sets up required javascript Implement in Page_Controller to override this function
- onAfterInit() — Inject required facebook scripts after initialisation
- onBeforeInit() — Ensures that the facebook API is initialised for this request
- redirectClient() — Redirects the user without interrupting rendering of page. This mechanism is used to provide a mechanism for redireciting the user while always displaying full opengraph tags for javascript-disabled crawlers (such as the facebook bot).
- requestFacebookPermissions() — Determine if the user is properly authorised, and uses javascript to redirect the user if not. If all requested permissions have been denied then the client code should be prepared to handle a manual process for applying for the missing permissions (e.g. present a link requesting full permissions).
- setDeniedFacebookPermissions() — Replaces all marked denied permissions with the specified list.
- updateGrantedFacebookPermissions() — Retrieves the list of all authorised permissions for the current user with the most updated version from the server