ApplicationExperienceEdge 1.0.0

Tweet Node

The Tweet Node allows a workflow to post a tweet using the provided Twitter application and account.

Tweet Node

Node Properties

The Tweet Node has three configuration parts…

Tweet Node - Configuration

Twitter Config

For the Tweet Node to work, Losant needs a number of different Twitter authorization keys. The Twitter API requires a Twitter Application in order to interact with the Twitter API. Each of the authorization values supports string templates, and most users choose to store these values in their workflow globals.

  • Consumer Key: The consumer key is generated by a Twitter Application. This field can be found at the top of the “Keys And Access Tokens” tab in the settings of a Twitter application.
  • Consumer Secret: The consumer secret is generated by a Twitter Application. This field can be found at the top of the “Keys And Access Tokens” tab in the settings of a Twitter application.
  • Access Token: This is the token is specifying the user account to publish the tweet. This field can be found at the bottom of the “Keys And Access Tokens” tab in the settings of a Twitter application, under the “Your Access Token” section.
  • Access Token Secret: This is the secret for authenticating the user account to publish the tweet. This field can be found at the bottom of the “Keys And Access Tokens” tab in the settings of a Twitter application, under the “Your Access Token” section.

Input

The tweet template is the message that will be sent and posted to Twitter. This message field supports string templates - but remember to keep the message under the Twitter character limit (280 characters), otherwise the tweet will be rejected.

Twitter Result

The result path is an optional path that will be placed on the payload as the result of the tweet request. This result will always be an object. It will always have a key called success. When true the tweet was successfully published. Otherwise when success is false, there will be another key on the object, error, which will contain an error at the key message. If this field is not set it can error the workflow.

Node Example

This is an example of an successful tweet, and the twitter result path is working.tweetResult.

{
  "working": {
    "tweetResult": {
      "success": true
    }
  }
}

Node Errors

This is an example of a tweet that errored, and the twitter result path is working.tweetResult.

{
  "working": {
    "tweetResult": {
      "success": false,
      "error": {
        "message": "Network error occurred"
      }
    }
  }
}