messagetokenpublishtwitterizer

Twitterizer: what is the workflow in order to publish messages on user's profile?


as I started to work with Twitterizer in order to publish on someone's wall I am in confusing time. There is a page, my case, DefaultTwitter.aspx where is link to authenticate on twitter with token provided. Goes on Twitter and comes back to CallbackTwitter.aspx with outh_token and secret. And so the user is identified. On twitterizer example says:

Step 5 - Store the results You should now store the access token and the user details. Keep in mind that the only way an access token will become invalid is if the user revokes access by logging into Twitter. Otherwise, those values will grant you access to that user's data forever.

My questions are: - should I store any data in SQL datatable and what exactly(however I hope that is not the case to do so)

-how will user revoke application access if he would like so?

A live example will be much appreciated as I could not found any on internet how exactly twitter api works.


Solution

  • When your application finishes getting authorization to access the user's data, the result is the access token (represented by 2 values, a key and a secret). Those values are, in effect, the username/password you can use in requests to the API on behalf of that user.* Save those values in your SQL database. You'll also be given the user id and screen name. It's probably a good idea to keep those handy, too.

    The user can revoke access to an application by going to http://twitter.com/settings/applications, finding the application and clicking the revoke access button next to it. Your application cannot revoke access for the user.

    You asked for an example, but you're citing the example application. Just look at the source code in that sample.

    * - That's a simplification for explanation sake. Please don't crucify me, OAuth experts.