Twitter is a free social networking and micro-blogging service that enables its users to send and read other users' updates known as tweets. Although Twitter was originally intended for communication among individuals, a number of organizations have begun to actively participate on the platform. Twitter allows customers the ability to get instant access pertaining to products, services, competitors, brands or real-time information about the organization itself. Twitter can be used to share important information, statistics, updates or ideas with others within a particular department, organization, business or industry. AWE's Twitter action can perform automated status message updates on a valid Twitter account. This action can update a status message on a schedule or when a certain event occurs. For example, the Twitter action can be used to perform internal updates on network issues for IT staff or external Twitter communications on new products or other subjects for marketing purposes. This action can also be used to perform a variety of other Twitter operations, such as Get Status, Delete Status, Send Direct Message, Get Friends, Get Followers and much more.
|
Use of this action requires a valid Twitter account. |
Example
This example code gets the current Twitter status:
<!-- <AMTWITTER ACTION="get_status" ID="3414059487" RESULTVARIABLE="status" RESULTDATASET="stsusdataset" USERNAME="username" PASSWORD="AM1KvnS5zvUCNIFdwmKwWQOKA==aME" /> -->
See Also: Send Email, HTTP, MSMQ, FTP, Get Email
To set properties
In the Available Actions pane, open the Network folder and double-click the action or drag it into the Steps pane.
On the General tab, select an Activity.
Specify the properties that appear, depending on the activity selected.
On the Authentication tab, specify the parameters as described below.
On the Parameters tab, specify the parameters as described below.
On the Proxy tab, specify the parameters as described below.
To set the Description tab properties, refer to Description Tab Options.
To set the Error Causes and On Error tab properties, refer to Step Error Handling.
When finished, click OK to save settings and close the properties dialog box.
Available Activities
The following table briefly describes the available activities for this action as specified in the Activity to perform box.
Activity |
Description |
Declaration |
Examples |
Delete Status |
Deletes a status. The returned status will have the complete status details. |
<AMTWITTER ACTIVITY="delete_status" ID="number" RESULTVARIABLE="text" RESULTDATASET="text" CONSUMERKEY="text" CONSUMERSECRET="text (encrypted)" SCREENNAME="text" ACCESSTOKEN="text" SECRETTOKEN="text" ENABLESSL="yes/no" PROXYSERVER="text" PROXYPORT="300" PROXYUSERNAME="text" PROXYPASSWORD="text (encrypted)" /> |
<AMTWITTER ACTIVITY="delete_status" RESULTVARIABLE="theVar" RESULTDATASET="theDataset" SCREENNAME="TweetyBird" ACCESSTOKEN="138893066-pcQPBQlFnI8exepSZPaQcnljQJNg4tB6mUfGAywz" SECRETTOKEN="pL1IdTedxHU6JFd6HHRlkncy98R5PQLwKyrESGGM" /> |
Follow User |
Follow a specific user. |
<AMTWITTER ACTIVITY="follow_user" USER="text" SCREENNAME="text" ACCESSTOKEN="text" SECRETTOKEN="text" ENABLESSL="yes" PROXYSERVER="text" PROXYPORT="number" PROXYUSERNAME="text" PROXYPASSWORD="text (encrypted)" /> |
<AMTWITTER ACTIVITY="follow_user" USER="tweetybird" SCREENNAME="Tarzan" ACCESSTOKEN="138893066-pcQPBQlFnI8exepSZPaQcnljQJNg4tB6mUfGAywz" SECRETTOKEN="pL1IdTedxHU6JFd6HHRlkncy98R5PQLwKyrESGGM" /> |
Get Direct Messages |
Get direct messages sent/received by user. |
<AMTWITTER ACTIVITY="get_directmessages" TYPE="text (options)" RESULTDATASET="text" SCREENNAME="text" ACCESSTOKEN="text" SECRETTOKEN="text" PROXYSERVER="text" PROXYPORT="text" PROXYUSERNAME="text" PROXYPASSWORD="text"><Parameter Name="since_id" Value="number" /><Parameter Name="max_id" Value="number" /><Parameter Name="count" Value="number" /><Parameter Name="page" Value="number" /></AMTWITTER> |
<AMTWITTER ACTIVITY="get_directmessages" TYPE="received" RESULTDATASET="theDataset" SCREENNAME="BatmanandRobin" ACCESSTOKEN="138893066-pcQPBQlFnI8exepSZPaQcnljQJNg4tB6mUfGAywz" SECRETTOKEN="pL1IdTedxHU6JFd6HHRlkncy98R5PQLwKyrESGGM" /> |
Get Followers |
Gets a list of followers (accepts parameters). |
<AMTWITTER ACTIVITY="get_followers" RESULTDATASET="text" CONSUMERKEY="text" CONSUMERSECRET="text" SCREENNAME="text" ACCESSTOKEN="text" SECRETTOKEN="text" PROXYSERVER="text" PROXYPORT="number" PROXYUSERNAME="text" PROXYPASSWORD="text"><Parameter Name="text (options)" Value="text" /></AMTWITTER> |
Sample 1 - Get information about follower with screen name "Superman". Store user information into AutoMate dataset "myDataset. <AMTWITTER ACTIVITY="get_followers" RESULTDATASET="theDataset" SCREENNAME="text" ACCESSTOKEN="138893066-pcQPBQlFnI8exepSZPaQcnljQJNg4tB6mUfGAywz" SECRETTOKEN="pL1IdTedxHU6JFd6HHRlkncy98R5PQLwKyrESGGM"><Parameter Name="screen_name" Value="Superman" /></AMTWITTER> |
Get Friends |
Gets a list of friends (accepts parameters). |
<AMTWITTER ACTIVITY="get_friends" RESULTDATASET="text" SCREENNAME="text" ACCESSTOKEN="text" SECRETTOKEN="text"><Parameter Name="text (options)" Value="text" /></AMTWITTER> |
Sample 1 - Get information about friend with screen name "Superman". Store user information into a dataset "myDataset. <AMTWITTER ACTIVITY="get_friends" RESULTDATASET="theDataset" SCREENNAME="ankurkumarpatel" ACCESSTOKEN="138893066-pcQPBQlFnI8exepSZPaQcnljQJNg4tB6mUfGAywz" SECRETTOKEN="pL1IdTedxHU6JFd6HHRlkncy98R5PQLwKyrESGGM"><Parameter Name="screen_name" Value="Superman" /></AMTWITTER> |
Get Mentions |
Returns a list of the most recent statuses that mention the authenticated user (accepts parameters). |
<AMTWITTER ACTIVITY="get_mentions" RESULTDATASET="text" SCREENNAME="text" ACCESSTOKEN="text" SECRETTOKEN="text" PROXYSERVER="text" PROXYPORT="number" PROXYUSERNAME="text" PROXYPASSWORD="text"><Parameter Name="text" Value="text" /></AMTWITTER> |
<AMTWITTER ACTIVITY="get_mentions" RESULTDATASET="theDataset" SCREENNAME="ronneylovely" ACCESSTOKEN="133348295-PORXRI8G89z6oQBklBYE8JN98VffugsRPAsnEKtw" SECRETTOKEN="DtemBbytOZERrkUBYFagHV1e5jju1APQ5cMo1GZMU"><Parameter Name="page" Value="2" /></AMTWITTER> |
Get Status |
Returns a single status with all the useful information. |
<AMTWITTER ACTIVITY="get_status" RESULTVARIABLE="theVar" RESULTDATASET="text" SCREENNAME="text" ACCESSTOKEN="text" SECRETTOKEN="text" /> |
Sample 1 - Get specific status by status ID 1047468972. Store status into AutoMate variable "theVar". Store status information into AutoMate dataset "theDataset". <AMTWITTER ACTIVITY="get_status" ID="1047468972" RESULTVARIABLE="theVar" RESULTDATASET="theDataset" SCREENNAME="ronneylovely" ACCESSTOKEN="133348295-Eg6hurc2YWpqdZrgbzsoXpWoQtT5D0vSn3UnhpME" SECRETTOKEN="lqNo7BuRHBeDfWAvSTsZg4B3UqQGXNAN9hynYCC5M" /> Sample 2 - Get current status. Store status into AutoMate variable "theVar". Store status information into AutoMate dataset "theDataset". <AMTWITTER ACTIVITY="get_status" RESULTVARIABLE="theVar" RESULTDATASET="theDataset" SCREENNAME="ronneylovely" ACCESSTOKEN="133348295-Eg6hurc2YWpqdZrgbzsoXpWoQtT5D0vSn3UnhpME" SECRETTOKEN="lqNo7BuRHBeDfWAvSTsZg4B3UqQGXNAN9hynYCC5M" /> |
Get Timeline |
Gets Friends, Users or Public timeline. Returns a list of most recent statuses from a user, friend or by any non-protected user (Public timelines accept parameters). |
<AMTWITTER ACTIVITY="get_timeline" TYPE="text (options)" RESULTDATASET="text" SCREENNAME="text" ACCESSTOKEN="text" SECRETTOKEN="text" PROXYSERVER="text" PROXYPORT="number" PROXYUSERNAME="text" PROXYPASSWORD="text" /> |
Sample 1 - A simple step that gets the timeline of type "user" and stores status information into a dataset named "theDataset". <AMTWITTER ACTIVITY="get_timeline" TYPE="user" RESULTDATASET="theDataset" SCREENNAME="ronneylovely" ACCESSTOKEN="133348295-PORXRI8G89z6oQBklBYE8JN98VffugsPPAsnEKtw" SECRETTOKEN="BtemBbytOZERrkUBYFagHV1e5jju1APQ5cMo1GZMU" /> Sample 2 - Get timeline of type "public". Store status information into AutoMate dataset named "theDataset". Loop through the dataset named "theDataset" . Dataset is sorted in ascending alphabetical order on the "TwitterUser" column. Within each iteration, display the following information:
<AMTWITTER ACTIVITY="get_timeline" TYPE="public" RESULTDATASET="theDataset" SCREENNAME="ronneylovely" ACCESSTOKEN="133348295-Eg6hurc2YWpqdZrgbzsoXpWoQtT5D0vSn3UnhpME" SECRETTOKEN="lqNo7BuRHBeDfWAvSTsZg4B3UqQGXNAN9hynYCC5M" /> <AMLOOP TYPE="DATASET" DATASET="theDataset" SORT="ascending" SORTEDCOLUMN="TwitterUser"> <AMSHOWDIALOG>Twitter User Name = %theDataset.TwitterUser% User Creation Date = %theDataset.Created% User ID = %theDataset.ID%</AMSHOWDIALOG> </AMLOOP> |
Search |
Search a Twitter feed. |
<AMTWITTER ACTIVITY="search" RESULTDATASET="text" SCREENNAME="text" ACCESSTOKEN="text" SECRETTOKEN="text">text<Parameter Name="until" Value="date" /></AMTWITTER> |
<AMTWITTER ACTIVITY="search" RESULTDATASET="theDataset" SCREENNAME="ronneylovely" ACCESSTOKEN="133348295-PORXRI8G89z6oQBklBYE8JN98VffugsRPAsnEKtw" SECRETTOKEN="DtemBbytOZERrkUBYFagHV1e5jju1APQ5cMo1GCMU">love OR hate<Parameter Name="until" Value="2010-01-01" /></AMTWITTER> |
Send Direct Message |
Sends a direct message. |
<AMTWITTER ACTIVITY="send_directmessage" USER="text" RESULTDATASET="text" SCREENNAME="text" ACCESSTOKEN="text" SECRETTOKEN="text">text</AMTWITTER> |
<AMTWITTER ACTIVITY="get_directmessages" TYPE="received" RESULTDATASET="theDataset" SCREENNAME="BatmanandRobin" ACCESSTOKEN="138893066-pcQPBQlFnI8exepSZPaQcnljQJNg4tB6mUfGAywz" SECRETTOKEN="pL1IdTedxHU6JFd6HHRlkncy98R5PQLwKyrESGGM" /> |
Stop Following User |
Stop following a specific user. |
<AMTWITTER ACTIVITY="stop_following_user" USER="text" SCREENNAME="text" ACCESSTOKEN="text" SECRETTOKEN="text" PROXYSERVER="text" PROXYPORT="text" PROXYUSERNAME="text" PROXYPASSWORD="text (encrypted)" /></AMTWITTER> |
<AMTWITTER ACTIVITY="stop_following_user" USER="Superman" SCREENNAME="Batman" ACCESSTOKEN="138893066-pcQPBQlFnI8exepSZPaQcnljQJNg4tB6mUfGAywz" SECRETTOKEN="pL1IdTedxHU6JFd6HHRlkncy98R5PQLwKyrESGGM" /> |
Update Status |
Posts the Status string as the body of a tweet on behalf of the authenticated user. |
<AMTWITTER RESULTDATASET="text" SCREENNAME="text" ACCESSTOKEN="text" SECRETTOKEN="text">text</AMTWITTER> |
<AMTWITTER RESULTDATASET="theDataset" SCREENNAME="theScreenName" ACCESSTOKEN="theToken" SECRETTOKEN="theTokenSecret">The status to update</AMTWITTER> |
Delete Status:
Property |
Type |
Required |
Default |
Markup |
Description |
Current Status |
|
|
|
|
If enabled, specifies that the current status of the authenticated user will be deleted. This is a visual mode parameter used only during design time, therefore, contains no markup. It is enabled by default. If this parameter is enabled, the Specific Status by ID parameter is ignored. |
Specific Status by ID |
Number |
No |
(Empty) |
ID="123456789" |
If enabled, specifies the status ID to delete. If this parameter is enabled, the Current Status parameter is ignored. |
Populate variable with status |
Text |
Yes |
(Empty) |
RESULTVARIABLE="theVar" |
The name of an existing variable to populate with the status that should be deleted. |
Create and populate dataset with status information |
Text |
No |
(Empty) |
RESULTDATASET="myStatus" |
The name of the dataset to create and populate with specific information about the status that should be deleted. |
Follow User:
Property |
Type |
Required |
Default |
Markup |
Description |
User (Screen Name) |
Text |
Yes |
(Empty) |
USER="tweetybird |
The screen name of the user you want to follow. |
Get Direct Messages:
Property |
Type |
Required |
Default |
Markup |
Description |
Type |
Text (options) |
Yes |
Sent |
TYPE="received" |
The type of Twitter direct messages to retrieve. The following options are:
|
Create and populate dataset with status information |
Text |
Yes |
(Empty) |
RESULTDATASET="theDataset" |
The name of the dataset to create and populate with specific information about the messages that should be retrieved. More on the dataset that this activity creates can be found under Notes below. |
Get Followers:
Property |
Type |
Required |
Default |
Markup |
Description |
Create and populate dataset with user information |
Text |
Yes |
(Empty) |
RESULTDATASET="theDataset" |
The name of the dataset to create and populate with specific information about the followers that should be retrieved. More on the dataset that this activity creates can be found below. |
Get Friends:
Property |
Type |
Required |
Default |
Markup |
Description |
Create and populate dataset with user information |
Text |
Yes |
(Empty) |
RESULTDATASET="theDataset" |
The name of the dataset to create and populate with specific information about the followers that should be retrieved. More on the dataset that this activity creates can be found under Notes below. |
Get Mentions:
Property |
Type |
Required |
Default |
Markup |
Description |
Create and populate dataset with status information |
Text |
Yes |
(Empty) |
RESULTDATASET="theDataset" |
The name of the dataset to create and populate with specific information about the mentions that should be retrieved. More on the dataset that this activity creates can be found under Notes below. |
Get Status:
Property |
Type |
Required |
Default |
Markup |
Description |
Current status |
If enabled, specifies that the current status will be retrieved. This is a visual mode parameter used only during design time, therefore, contains no markup. If this parameter is enabled, the Specific status by ID parameter is ignored. |
||||
Specific status by ID |
Number |
No |
(Empty) |
ID="1047468972" |
If enabled, specifies that the current status will be retrieved. This is a visual mode parameter used only during design time, therefore, contains no markup. If this parameter is enabled, the Specific status by ID parameter is ignored. |
Populate variable with status |
Text |
Yes |
(Empty) |
RESUTLVARIABLE="theVarName" |
The name of an existing variable in which to populate with the retrieved status. |
Create and populate dataset with user information |
Text |
No |
(Empty) |
RESULTDATASET="theDataset" |
The name of the dataset to create and populate with specific information about the followers that should be retrieved. More on the dataset that this activity creates can be found under Notes below. |
Get Timeline:
Property |
Type |
Required |
Default |
Markup |
Description |
Type |
Text (options) |
No |
Friends |
TYPE="public" |
The type of timeline in which to retrieve. The available options are:
|
Create and populate dataset with user information |
Text |
No |
(Empty) |
RESULTDATASET="theDataset" |
The name of the dataset to create and populate with specific information about the timeline that should be retrieved. More on the dataset that this activity creates can be found under Notes below. |
Search:
Property |
Type |
Required |
Default |
Markup |
Description |
Query |
Text |
Yes |
(Empty) |
SearchText</AMTWITTER> |
The search query to execute. This parameter supports most search operators which can be typed directly into the search box. Valid search operators are listed below under Notes. |
Create and populate dataset with user information |
Text |
Yes |
(Empty) |
RESULTDATASET="theDataset" |
The name of the dataset to create and populate with information resulting from the specified query. More on the dataset that this activity creates can be found under Notes below. |
Send Direct Messages:
Property |
Type |
Required |
Default |
Markup |
Description |
Status message |
Text |
Yes |
(Empty) |
textMessage</AMTWITTER> |
The direct message to send. |
Create and populate dataset with status information |
Text |
Yes |
(Empty) |
RESULTDATASET="theDataset" |
The name of the dataset to create and populate with specific information about the messages that should be retrieved. More on the dataset that this activity creates can be found under Notes below. |
Stop Following User:
Property |
Type |
Required |
Default |
Markup |
Description |
User (Screen Name) |
Text |
Yes |
(Empty) |
USER="tweetybird |
The screen name of the user you want to stop following. |
Update Status:
Property |
Type |
Required |
Default |
Markup |
Description |
User (Screen Name) |
Text |
Yes |
(Empty) |
USER="tweetybird |
The screen name of the user you want to stop following. |
Property |
Type |
Required |
Default |
Markup |
Description |
Default Keys |
If enabled, specifies that the default consumer/secret key combination used to authorize AWE access to Twitter API will be used. This also determines the text status that appears via Twitter application. Selecting this option would show AWE as the default application used to perform status updates. This is a visual mode parameter used only during design time, therefore, contains no markup. If this parameter is enabled, the Custom Keys parameter is ignored. It is enabled by default. |
||||
Custom Keys |
If enabled, specifies that a custom consumer/secret key combination should be entered. This also determines the text status that appears via Twitter application. Selecting this option would show the specified application name as the one used to perform status updates. This is a visual mode parameter used only during design time, therefore, contains no markup. If this parameter is enabled, the Default Keys parameter is ignored. |
||||
Consumer Key |
Text |
No |
(Empty) |
CONSUMERKEY="text" |
The consumer key to authenticate with. To use the Twitter API, each client application you register will be provisioned a consumer key and secret. This parameter is available only if the Custom Keys parameter is enabled. More information about OAuth authentication can be found below. |
Consumer Secret |
Text |
No |
(Empty) |
CONSUMERSECRET="encrypted" |
The consumer key secret to authenticate with. To use the Twitter API, each client application you register will be provisioned a consumer key and secret. This parameter is available only if the Custom Keys parameter is enabled. More information about OAuth authentication can be found below . |
Get PIN |
You must initially register AWE (or the desired application) to allow it to use the Twitter API. If you have not done so already, click Get Pin. This will open your Twitter account site. Follow the instructions and copy the provided pin. Thereafter, return to the AWE Twitter authentication properties dialog and paste it in the Pin text box. Click Authenticate Pin to produce a consumer key and secret, thus, completing the token exchange. This is a visual mode parameter used only during design time, therefore, contains no markup. NOTE: This is a one-time process. Once authenticated, the information will be stored on your system. More information about OAuth authentication can be found below. |
||||
Pin |
The pin in which to authorize AWE to allow it to use the Twitter API. This is a visual mode parameter used only during design time, therefore, contains no markup. |
||||
Authenticate Pin |
Click Authentication Pin to authenticate the provided PIN. This is a visual mode parameter used only during design time, therefore, contains no markup. NOTE: This is a one-time process. Once authenticated, the information will be stored on your system. |
||||
Screen Name |
Text |
Yes |
(Empty) |
SCREENNAME="Catwoman" |
The screen name of the authenticating user. This is a visual mode parameter used only during design time, therefore, contains no markup. |
Enable SSL |
Yes/No |
No |
(Empty) |
ENABLESSL="yes" |
If set to YES, SSL is enabled. This parameter is set to NO by default. |
Access Token |
Text |
No |
(Empty) |
SECRETTOKEN= "pL1IdTedxHU6JFd6HHRlknM" |
The Oauth Access Token. This allows OAuth applications to directly exchange Twitter user names and passwords for OAuth access tokens and secrets. More information can be found below. |
Access Token Secret |
Text |
No |
(Empty) |
SECRETTOKEN="text" |
The Oauth Token Secret. This allows OAuth applications to directly exchange Twitter user names and passwords for OAuth access tokens and secrets. More information can be found below. |
NOTE: Only the HTTP proxy is supported.
Property |
Type |
Required |
Default |
Markup |
Description |
Proxy Host |
Text |
No |
(Empty) |
PROXYSERVER="host.domain.com" |
The host name (i.e. server.domain.com) or IP address (i.e. xxx.xxx.xxx.xxx) of the proxy server. |
Proxy Port |
Number |
No |
(Empty) |
PROXYPORT="300" |
The port that should be used to connect. |
Proxy Username |
Text |
No |
(Empty) |
PROXYUSERNAME="user" |
The user name that should be used to authenticate when connecting through the proxy server. |
Proxy Password |
Text |
No |
(Empty) |
PROXYPASSWORD="encrypted" |
The password that should be used to authenticate when connecting through the proxy server. |
This action includes the Description tab for entering a custom step description.
More on setting custom step description
This action also includes the standard Error Causes and On Error failure handling options/tabs.
More on Error Handling Options
All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, % Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.