lib/opauth/Strategy/Facebook/FacebookStrategy.php
private function me($access_token){
		$fields = 'id,name,email';//default value
		if ( isset($this->strategy['fields']) ) {
			$fields = $this->strategy['fields'];
		}

		$me = $this->serverGet("https://graph.facebook.com/{$this->api_version}/me",
			array(
				'appsecret_proof' => hash_hmac('sha256', $access_token, $this->strategy['app_secret']),
				'access_token' => $access_token,
				'fields' => $fields
			),
			null,
			$headers
		);

		if (empty($me)){
			$error = array(
				'provider' => 'Facebook',
				'code' => 'me_error',
				'message' => 'Failed when attempting to query for user information',
				'raw' => array(
					'response' => $me,
					'headers' => $headers
				)
			);
			$this->errorCallback($error);
			return;
		}
		return json_decode($me);
	}
private function me($access_token){
		$fields = 'id,name,email';//default value
		if ( isset($this->strategy['fields']) ) {
			$fields = $this->strategy['fields'];
		}

		$me = $this->serverGet("https://graph.facebook.com/{$this->api_version}/me",
			array(
				'appsecret_proof' => hash_hmac('sha256', $access_token, $this->strategy['app_secret']),
				'access_token' => $access_token,
				'fields' => $fields
			),
			null,
			$headers
		);

		if (empty($me)){
			$error = array(
				'provider' => 'Facebook',
				'code' => 'me_error',
				'message' => 'Failed when attempting to query for user information',
				'raw' => array(
					'response' => $me,
					'headers' => $headers
				)
			);
			$this->errorCallback($error);
			return;
		}
		return json_decode($me);
	}
private function me ( $ access_token ) { $ fields = 'id,name,email' ; //default value if ( isset ( $ this -> strategy [ 'fields' ] ) ) { $ fields = $ this -> strategy [ 'fields' ] ; } $ me = $ this -> serverGet ( "https://graph.facebook.com/{$this->api_version}/me" , array ( 'appsecret_proof' => hash_hmac ( 'sha256' , $ access_token , $ this -> strategy [ 'app_secret' ] ) , 'access_token' => $ access_token , 'fields' => $ fields ) , null , $ headers ) ; if ( empty ( $ me ) ) { $ error = array ( 'provider' => 'Facebook' , 'code' => 'me_error' , 'message' => 'Failed when attempting to query for user information' , 'raw' => array ( 'response' => $ me , 'headers' => $ headers ) ) ; $ this -> errorCallback ( $ error ) ; return ; } return json_decode ( $ me ) ; }
Queries Facebook Graph API for user info

@param string $access_token
@return array Parsed JSON results
Queries Facebook Graph API for user info