8000 Fix #11, error in README that caused errors when adopting via copy-pa… · codezninja/codebird-php@8306c06 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8306c06

Browse files
committed
Fix jublo#11, error in README that caused errors when adopting via copy-paste, or when reloading with oauth_verifier
1 parent 5e3148c commit 8306c06

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ if (! isset($_GET['oauth_verifier'])) {
6161
header('Location: ' . $auth_url);
6262
die();
6363

64-
} else {
64+
} elseif (! isset($_SESSION['oauth_verified'])) {
6565
// gets the access token
6666
$cb->setToken($_SESSION['oauth_token'], $_SESSION['oauth_token_secret']);
6767
$reply = $cb->oauth_accessToken(array(
@@ -70,6 +70,8 @@ if (! isset($_GET['oauth_verifier'])) {
7070
// store the authenticated token, which may be different from the request token (!)
7171
$_SESSION['oauth_token'] = $reply->oauth_token;
7272
$_SESSION['oauth_token_secret'] = $reply->oauth_token_secret;
73+
$cb->setToken($_SESSION['oauth_token'], $_SESSION['oauth_token_secret']);
74+
$_SESSION['oauth_verified'] = true;
7375
}
7476
```
7577

0 commit comments

Comments
 (0)
0