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).
Signature
public function requestFacebookPermissions(string|array
$permissions,
[string
$redirectURL = NULL,
[boolean
$useClientRedirect = true,
[boolean
$ignoreDenied = false]]] )
Parameters
$permissions
—
object
List permissions required in this login
$redirectURL
—
string
URL to redirect user to after permissions are approved param boolean $useClientRedirect Flag indicating whether the user should be redirected via http headers or javascript. If true, the user will be redirected via a client script. If false the user will be redirected via a Location HTTP header. This should be left true if the application sits within an frame, as redirecting the user to a permissions dialog within an iframe will cause a blank page (as facebook doesn't allow this, even if it's their own iframe). The use of javascript to redirect the user allows frame popping.
$useClientRedirect
—
boolean
$ignoreDenied
—
boolean
Force these permissions to be requested, even if they have been previously denied
Returns
boolean
Flag indicating whether the user is properly authenticated