Abraham,
To fully understand what I am doing and reading the callback.php script:
$access_token = $connection->getAccessToken($_REQUEST['oauth_verifier']);
This token will be used to future calls for this particular user, right?
$_SESSION['access_token'] = $access_token;
Save the token to a session var, to use in other pages.
unset($_SESSION['oauth_token']);
unset($_SESSION['oauth_token_secret']);
I do not need the oauth tokens from the user so I am deleting them
if (200 == $connection->http_code) {
$_SESSION['status'] = 'verified';
header('Location: ./index.php');
} else {
header('Location: ./clearsessions.php');
}
if 200 I can post to twitter, get messages… etc. If not, we need to connect again.
I am correct? Thank you in advance for your help.