How to verify that a Twitter user's oauth token is valid on the server?

dsatea

New Member
If my web server is given a Twitter user ID and oauth token, how can I verify that the provided user ID is indeed using the provided oauth token? I don't want some hacker to just give me user ID 123456 and oauth token abcdefg to masquerade as another user.Here are the steps I'm taking: [*]User logs into Twitter with ACAccountStore requestAccessToAccountsWithType. At this point, the user can tweet without any involvement from my server.[*]I then use reverse authentication to get the user's oauth token. [*]Finally, I send the user's ID and oauth token to my server (running PHP). [*]The server needs to verify that this user ID is indeed using this oauth token. This is the part that I'm stuck on.All StackOverflow posts point to account/verify_credentials. I don't understand how it is used because I don't see user ID or oauth token in the parameter list.
 
Back
Top