本文整理匯總了PHP中BaseFacebook::user方法的典型用法代碼示例。如果您正苦於以下問題:PHP BaseFacebook::user方法的具體用法?PHP BaseFacebook::user怎麽用?PHP BaseFacebook::user使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類BaseFacebook
的用法示例。
在下文中一共展示了BaseFacebook::user方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: destroySession
/**
* Destroy the current session
*/
public static function destroySession()
{
self::$accessToken = null;
self::$signedRequest = null;
self::$user = null;
self::clearAllPersistentData();
// Javascript sets a cookie that will be used in getSignedRequest that we
// need to clear if we can
$cookie_name = self::getSignedRequestCookieName();
if (array_key_exists($cookie_name, $_COOKIE)) {
unset($_COOKIE[$cookie_name]);
if (!headers_sent()) {
$base_domain = self::getBaseDomain();
setcookie($cookie_name, '', 1, '/', '.' . $base_domain);
} else {
// @codeCoverageIgnoreStart
self::errorLog('There exists a cookie that we wanted to clear that we couldn\'t ' . 'clear because headers was already sent. Make sure to do the first ' . 'API call before outputing anything.');
// @codeCoverageIgnoreEnd
}
}
}