What is the difference between "Your access token" in my twitter application settings and the function get_tokens?


#1

I want my users sign in to my website with twitter api.
In order to avoid asking them for credentials each time, i use twitter tokens and i store them in db.
So what is the point of “Your access token” in my twitter application settings because each user has different tokens?

What I mean is normally , i get tokens for each user with a call from get_tokens() function.
See https://github.com/elliothaughin/codeigniter-twitter/blob/master/application/libraries/tweet.php for the function details, I’m using twitter with elliothaughin’s php library.

Thank you.


#2

The “your access token” feature is just a simple convenience feature to access the access token for yourself within the context of your application – without having to negotiate the access token through OAuth first. It’s especially useful for single-user/single-use applications.

For your context, you’ll just want to use the access tokens you negotiate and store on behalf of your users (that you’re also one of).


#3

Ok, thanks.
What is strange is that I had the error this morning ‘Invalid token’ using the same access token through Oauth since few months. I choose to replace it by the provided in the app settings, and it works again now.

Regards.


#4

You might have inadvertently caused this situation by issuing the “my access token” or vice-versa. Ultimately, there can be only one representation of your authorization with an application – in most circumstances, if you complete an authorization flow for the same level of permissions for a token that already exists, you’ll get the same set of strings back to represent that permission. But there are cases where either a revocation has occurred or the level of permissions being asked for is different, and in these cases new strings for the oauth_token and oauth_token_secret will be issued, invalidating previous representations.


#5

hello