I have following scenario:
User (admin of my website) wants to publish post on Twitter for the first time. App will redirect user to Twitter, so that he can login, and then it will publish post. Just like in example provided in Readme.
When same user wants to publish another post, I would like to avoid need for authentication again.
So, I stored in db, oauth_token and oauth_verifier that Twitter API returned when signing in for the first time (basically after this piece of code)
// get request token
$reqToken = $this->consumer->requestRequestToken();
// get Authorization Uri sending the request token
$url = $this->consumer->getAuthorizationUri(array('oauth_token' => $reqToken->getRequestToken()));
And now, I just want to use those stored values, request access token again (do I need to?), and to publish post (without redirecting user to Twitter sign in page again, if he is signed out for some reason ).
I have following scenario: User (admin of my website) wants to publish post on Twitter for the first time. App will redirect user to Twitter, so that he can login, and then it will publish post. Just like in example provided in Readme. When same user wants to publish another post, I would like to avoid need for authentication again. So, I stored in db,
oauth_token
andoauth_verifier
that Twitter API returned when signing in for the first time (basically after this piece of code)And now, I just want to use those stored values, request access token again (do I need to?), and to publish post (without redirecting user to Twitter sign in page again, if he is signed out for some reason ).
(where $social->twitter_access_token and $social->twitter_verifier are fetched from db)
but it keeps returning
TokenResponseException
with messageFailed to request resource
.Am I missing something obvious regarding OAuth? I checked other issues, but couldn't find solution. Please let me know if this is possible at all.