I have a doubt about how to init session with the four access tokens that I had obtained when I register my app.
I need to persist’em for an extended period. But I don’t know how to do it. Or I least I don’t understand what am I doing wrong. Lets beging for the beginning:
I registered my application. And obtained the access tokens (4; Consumer key, Consumer secret, Access token, Access token Secret).
I had created a PHP script (that has to be triggered automatically with a cronjob). This script select the access tokens from data base and the info that is going to be posted.
the script connect with twitter using the Abraham Williams’ Library. It does like this:
$access_token = $_SESSION['access_token']; $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $access_token['oauth_token'], $access_token['oauth_token_secret']); $content = $connection->get('account/verify_credentials');
By the way, if I change $access_token[‘oauth_token’] and $access_token[‘oauth_token_secret’] for those that are given me in the app registration it should not connect??
I hope you can help me with this. Thank you very much! - H