Content and purpose
Attached to the page are 2 Apstrata server-side scripts that will allow you to easily integrate your application to twitter.
Note that tweeting is a twofold process:
1) first, you need to authorize a twitter application on your twitter account, unless the user has already authorized the application (you only have to do this once, of course)
2) second, your web/mobile application invokes Apstrata to tweet
Authorize the twitter application
Step 1- Ask for an authorization URL
- command : the call to make on twitter. Use. "getRequestToken"
- requester : some value that identifies the initiator of the tweet request (for example, a phone number. Don't user email addresses, or remove the '@')
- consumerKey: the consumer key of the twitter application you need to integrate with. If not specified, will use the default (see in code)
- consumerSecret: the consumer secret of the twitter application. Optional as well, if not specified, will use the default
- store: (optional) the store where the optional configuration document (see "Note" below) is created and were the
requestToken and requestSecret will be temporarily stored.
- When successful
- When failure
Step 2 - Authorize the Twitter application and get an access token and access secret
Next step is to call twitter using the returned authorization URL. This will display a page where you will have to explicitly authorize the application on your account. Once you authorize the application, tweeter calls back the server side script that will create the access token and access token secret.
Tweet on the user's twitter account
Use the social.twitter.api script.
- consumerKey: the twitter application key
- consumerSecret: the twitter application secret
- accessToken: the token returned by twitter after authorizing the application (step 1 - described in paragraph 3.2.1)
- accessTokenSecret: the secret returned by twitter after authorizing the application (step 1 - described in paragraph 3.2.1)
- command: the api function to call ("tweet")
- tweetString: the message to tweet