Posting Tweets and Messages
Posting to Twitter involves the use of a Task in a Process definition:
As shown above, a Procedure.SendTweet element is added beneath a Task element in the Process definition. Its attributes are set as follows:
- Connection ID - (Required) The ID of the Connection.Twitter element configured in the _Settings definition.
- ID - (Required) A unique element ID.
- Text - (Required) The actual text to be posted; limited to 140 characters. This value can be parameterized using a token, such as @Request.myText~.
- Tweet Type - (Required) The type of post: either Tweet or Direct Message.
- Screen Name - The name of the recipient. This attribute is unnecessary when the Tweet Type attribute is set to Tweet, but is required when it's set to Direct Message. This value can be parameterized using a token, such as @Request.ScreenName~.
Running this task will cause the message to be posted directly to Twitter.com.
The If Error element can be used beneath Procedure.SendTweet to capture error messages and send them as a request parameter to a report definition for display.