Database Reference
In-Depth Information
Registers on Twitter to
access APIs
Issues the consumer
token & secret
Directs user to
Twitter to verify user
credentials
Enters
credentials
Validates credentials &
issues a OAuth verifier
Requests access token
using the OAuth verifier,
consumer token & secret
Issues access
token & secret
Requests for content
using access token &
secret
Responds with
requested information
Fig. 2.1
OAuth workflow
3. The user provides this PIN to the application. The application uses the PIN to
request an “Access Token” and “Access Secret” unique to the user.
4. Using the “Access Token” and “Access Secret”, the application authenticates the
user on Twitter and issues API calls on behalf of the user.
The “Access Token” and “Access Secret” for a user do not change and can be cached
by the application for future requests. Thus, this process only needs to be performed
once, and it can be easily accomplished using the method GetUserAccessKeySecret
in Listing 2.1 .
2.2
Collecting a User's Information
On Twitter, users create profiles to describe themselves to other users on Twitter.
A user's profile is a rich source of information about him. An example of a Twitter
user's profile is presented in Fig. 2.2 . Following distinct pieces of information
regarding a user's Twitter profile can be observed in the figure:
Search WWH ::




Custom Search