Twitter - Update status

 

Declaration

<AMTWITTER RESULTDATASET="text" SCREENNAME="text" ACCESSTOKEN="text" SECRETTOKEN="text">text</AMTWITTER>

Related Topics   

Description

Posts a Twitter Update, or Tweet. Each update must be140 characters or less.

IMPORTANT: Automate's Twitter activities are performed using the Twitter REST API, therefore, launching and managing Twitter through Automate requires a valid Twitter account.

Practical Usage

Twitter always asks the question, "What's happening?" Each answer to that question is considered a Twitter status update, or what people often call a "tweet."

Parameters

General

Property

Type

Required

Default

Markup

Description

Status message

Text

Yes

(Empty)

>the message</AMTWITTER>

The status message in which to update.

Create and populate dataset with status message

Text

Yes

(Empty)

RESULTDATASET="theDataset"

The dataset to create and populate with the status update.

Authentication Properties

Property

Type

Required

Default

Markup

Description

Default Keys

 

 

 

 

If enabled, specifies that the default consumer/secret key combination used to authorize Automate access to Twitter API will be used. This also determines the text status that appears by way of Twitter application. Selecting this option would show Automate 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 by way of 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 under Notes.  

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 under Notes.

Get PIN

 

 

 

 

You must initially register Automate (or the desired application) to allow it to use the Twitter API. If you have not done so already, click the Get Pin button. This will open your Twitter account site. Follow the instructions and copy the provided pin. Thereafter, return to the Automate Twitter authentication properties dialog and paste it in the Pin text box. Click the Authenticate Pin button 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 under Notes.    

Pin

 

 

 

 

The pin in which to authorize Automate 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 this button 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 selected, SSL is enabled. This parameter is disabled by default.

Access Token

Text

No

(Empty)

ACCESSTOKEN="138893066-pcQPBQlFnI8exepS"

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 under Notes.  

Access Token Secret

Text

No

(Empty)

SECRETTOKEN="encrypted"

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 under Notes.  

Proxy Properties (Only HTTP proxy os 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.

 

Description

Error Causes

On Error

Additional Notes

OAuth Consumer Key/Secret Authentication

To use the Twitter API, the first thing you have to do is register a client application. Each client application you register will be provisioned a consumer key and secret. This key and secret scheme is similar to the public and private keys used in protocols such as ssh for those who are familiar. This key and secret will be used, in conjunction with an OAuth library in your programming language of choice, to sign every request you make to the API. It is through this signing process that Twitter trusts that the traffic that identifies itself is in fact you.

OAuth authentication is the process in which Users grant access to their Protected Resources without sharing their credentials with the Consumer. OAuth uses Tokens generated by the Service Provider instead of the User’s credentials in Protected Resources requests. The process uses two Token types:

Request Token:

Used by the Consumer to ask the User to authorize access to the Protected Resources. The User-authorized Request Token is exchanged for an Access Token, MUST only be used once, and MUST NOT be used for any other purpose. It is RECOMMENDED that Request Tokens have a limited lifetime.

Access Token:

Used by the Consumer to access the Protected Resources on behalf of the User. Access Tokens MAY limit access to certain Protected Resources, and MAY have a limited lifetime. Service Providers SHOULD allow Users to revoke Access Tokens. Only the Access Token SHALL be used to access the Protect Resources.

OAuth Authentication is done in three steps:

  1. The Consumer obtains an unauthorized Request Token.

  2. The User authorizes the Request Token.

  3. The Consumer exchanges the Request Token for an Access Token.

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (Example: %myVariable% or %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by clicking theInsert expression/variablebutton or pressingF2.

More on variables
More on expressions

More on the Expression Builder

Example

NOTE:
  • The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
  • Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.

Description:

Update twitter status message  to "The status to update". Store status information into Automate dataset "theDataset".

<AMTWITTER RESULTDATASET="theDataset" SCREENNAME="theScreenName" ACCESSTOKEN="theToken" SECRETTOKEN="theTokenSecret">The status to update</AMTWITTER>

↑ Top of Page