Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

Commit 4cc5f76

Browse files
author
Fosco Marotto
committed
Updated AccessToken->isAppSession
1 parent fd6d9c5 commit 4cc5f76

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

src/Facebook/Entities/AccessToken.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,7 @@ public function __toString()
374374
*/
375375
public function isAppSession()
376376
{
377-
if (strpos($this->accessToken, "|") !== FALSE) {
378-
return true;
379-
}
380-
return false;
377+
return strpos($this->accessToken, "|") !== false;
381378
}
382379

383380
}

tests/FacebookRedirectLoginHelperTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,11 @@ public function testLogoutURLFailsWithAppSession()
8080
FacebookTestCredentials::$appSecret
8181
);
8282
$helper->disableSessionStatusCheck();
83-
$session = FacebookSession::newAppSession(
84-
FacebookTestCredentials::$appId,
85-
FacebookTestCredentials::$appSecret
86-
);
83+
$session = FacebookTestHelper::getAppSession();
8784
$this->setExpectedException(
8885
'Facebook\\FacebookSDKException', 'Cannot generate a Logout URL with an App Session.'
8986
);
90-
$logoutUrl = $helper->getLogoutUrl(
87+
$helper->getLogoutUrl(
9188
$session, self::REDIRECT_URL
9289
);
9390
}

0 commit comments

Comments
 (0)