Twitter - Delete status |
Declaration
<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)" /> |
Description
Deletes the authenticated user's current status or status specified by the required ID parameter and populates a variable with the deleted status. Can optionally populate a dataset with specific information about the deleted status. The authenticating user must be the author of the specified status.
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
Deletes the current status or one specified by the required ID.
Parameters
Authentication
Property |
Type |
Required |
Default |
Markup |
Description |
Type |
--- |
--- |
--- |
--- |
Specifies the type of authentication that should be used to establish a Twitter connection. This is a visual mode parameter used only during design time, therefore, contains no markup. The available options are:
|
Consumer key |
Text |
Yes if Type set to Custom keys |
(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. |
Consumer secret |
Text |
Yes if Type set to Custom keys |
(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. |
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 OAuth Consumer Key/Secret Authentication. |
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) |
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 under OAuth Consumer Key/Secret Authentication. |
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 under OAuth Consumer Key/Secret Authentication. |
General
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. |
Proxy Properties
NOTE: 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. |
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:
-
The Consumer obtains an unauthorized Request Token.
-
The User authorizes the Request Token.
-
The Consumer exchanges the Request Token for an Access Token.
Datasets
A dataset is a multiple column, multiple row container object. This activity creates and populates a dataset containing a specific set of fields. The table below describes these fields (assuming the dataset name assigned was theDataset).
Name |
Type |
Return Value |
theDataset.Created |
Date |
Coordinated Universal Time (UTC) timestamp of element creation, either status or user. (Example: Sat Jan 24 22:14:29 +0000 2009) |
theDataset.ID |
Number |
The user's unique ID. |
theDataset.InReplyToStatusID |
Number |
The unique ID for the status a status replies to. (Examples: empty, 1047468972) |
theDataset.InReplyToUserID |
Number |
A unique ID for the user that wrote the status a status replies to. |
theDataset.InReplyToScreenName |
Text |
The name for the user that wrote the status a status replies to. |
theDataset.IsFavorited |
True/False |
Boolean indicating if a status has been marked as a favorite by the authenticating user. |
theDataset.IsTruncated |
True/False |
Boolean indicating if a status required shortening. |
theDataset.Source |
Number |
Application that sent a status. (Examples: web (Default), <a href="http://www.tweetdeck.com/">TweetDeck</a>) |
theDataset.RetweetedStatus |
Number |
The total number of status updates performed by a user, excluding direct messages sent. |
theDataset.Text |
Text |
Escaped and HTML encoded status body. |
theDataset.TwitterUser |
Text |
Full name of a registered user (Example: Tweety Bird, Doug Williams) |
Example
- 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:
This example step deletes a status and stores status into Automate variable "theVar". It also stores status information into Automate dataset "theDataset".
<AMTWITTER ACTIVITY="delete_status" RESULTVARIABLE="theVar" RESULTDATASET="theDataset" SCREENNAME="TweetyBird" ACCESSTOKEN="138893066-pcQPBQlFnI8exepSZPaQcnljQJNg4tB6mUfGAywz" SECRETTOKEN="pL1IdTedxHU6JFd6HHRlkncy98R5PQLwKyrESGGM" /> |