You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the script doesn't save that information, though I think it should. Notice the save_access_token() function that is called just after the above code. That save function (line 367) only saves the access token and token secret. If you want to save the info you can do something like:
A question was given:
What is the best way to retrieve the user_id?
Answer:
Currently, it's not supported, but will be implemented in v1.0. Here was my response:
First, you can just make an API call to:
https://dev.twitter.com/docs/api/1/get/users/show
(I think https://dev.twitter.com/docs/api/1/get/users/lookup is for batch lookups.)
Otherwise, you'll have to catch it when the request tokens are exchanged for access tokens:
https://dev.twitter.com/docs/auth/oauth#Exchanging_a_request_token_for_an_access_token
The user_id and screen_name are returned at that point. So, check around line 289 at the get_access_token function and you'll see something like:
Currently, the script doesn't save that information, though I think it should. Notice the save_access_token() function that is called just after the above code. That save function (line 367) only saves the access token and token secret. If you want to save the info you can do something like:
Then add around line 1142 the following:
So, it's kinda confusing, but if you do the above right, you should be able to get the user_id by:
And same for screen_name. I'll add this post to the issues list and put it in for v1.0.
If you don't get the above to work, let me know and perhaps I can help.
Good luck!
The text was updated successfully, but these errors were encountered: