64                assert(
'is_array($info)');
 
   65                assert(
'is_array($config)');
 
   72                $this->api_key = $cfgParse->getString(
'api_key');
 
   73                $this->secret = $cfgParse->getString(
'secret');
 
   74                $this->req_perms = $cfgParse->getString(
'req_perms', NULL);
 
   75                $this->user_fields = $cfgParse->getString(
'user_fields', NULL);
 
   85                assert(
'is_array($state)');
 
   92                $facebook->destroySession();
 
   95                $url = $facebook->getLoginUrl(array(
'redirect_uri' => $linkback, 
'scope' => $this->req_perms));
 
  103                assert(
'is_array($state)');
 
  106                $uid = $facebook->getUser();
 
  108                if (isset($uid) && $uid) {
 
  110                                $info = $facebook->api(
"/" . $uid . ($this->user_fields ? 
"?fields=" . $this->user_fields : 
""));
 
  122                        if (is_string($value) && !empty($value)) {
 
  127                if (array_key_exists(
'third_party_id', 
$info)) {
 
  128                        $attributes[
'facebook_user'] = array(
$info[
'third_party_id'] . 
'@facebook.com');
 
  130                        $attributes[
'facebook_user'] = array($uid . 
'@facebook.com');
 
  133                $attributes[
'facebook_targetedID'] = array(
'http://facebook.com!' . $uid);
 
  140                $facebook->destroySession();
 
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
An exception for terminatinating execution or to throw for unit testing.
Copyright 2011 Facebook, Inc.
static getModuleURL($resource, array $parameters=array())
Get absolute URL to a specified module resource.
static redirectTrustedURL($url, $parameters=array())
This function redirects to the specified URL without performing any security checks.
static saveState(&$state, $stage, $rawId=false)
Save the state.
static loadFromArray($config, $location='[ARRAY]', $instance=null)
Loads a configuration from the given array.
$api_key
Facebook App ID or API Key.
authenticate(&$state)
Log-in using Facebook platform.
const AUTHID
The key of the AuthId field in the state.
__construct($info, $config)
Constructor for this authentication source.
$user_fields
A comma-separated list of user profile fields to request.
$req_perms
Which additional data permissions to request from user.
const STAGE_INIT
The string used to identify our states.
$secret
Facebook App Secret.
Extends the BaseFacebook class with the intent of using PHP sessions to store user ids and access tok...