twitter - the user is forced to authorize my app each time -



twitter - the user is forced to authorize my app each time -

i using tweepy api oauth: http://packages.python.org/tweepy/html/auth_tutorial.html#oauth-authentication

the first time, user inquire authorize app. sec time, dont want user asked authorize app again.

the tutorial says

it thought save access token later use. not need re-fetch each time. twitter not expire tokens, time ever go invalid if user revokes our application access. store access token depends on application. need store 2 string values: key , secret:

auth.access_token.key

auth.access_token.secret

i plan store access_token key , secret session. when user utilize app sec time, utilize access_token, user not forced authorize app again.

however, problem happen when many twitter users utilize app, how can know access_token belong user.

i hope question clear.

stop twitter forcefulness user authorize app sec time.

if need store access_token solve (1), how can know access_token belong user.

you need implement session management in web app , associate session ids user model stores auth information. don't language using if utilize ruby on rails framework session management done. recommend devise gem omniauth-twitter (https://github.com/arunagw/omniauth-twitter).

twitter twitter-oauth tweepy

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -