Execute a request against the Twitter API. For successful requests, the HTTPResponse object will contain an object or array or objects decoded from the JSON returned by Twitter as appropriate to the request made. Refer to Twitter’s API documentation for details about the expected parameters and responses. Drafts will handle wrapping the request in the appropriate OAuth authentication flow.
an object with the following properties:
Optional
data?: { [x: string]: string }Optional
headers?: { [x: string]: string }Optional
parameters?: { [x: string]: string }Post a status update (tweet) to Twitter. Returns true
if successful, false
if not. After success the lastResponse
object can be used to inspect response and get details such as the ID of the tweet created. Refer to Twitter API POST /status/update documentation for response details.
Static
createCreates a new Twitter object. Identifier is a optional string value used to identify a Twitter account. Typically this can be omitted if you only work with one Twitter account in Drafts. Each unique identifier used for Twitter accounts will share credentials - across both action steps and scripts.
Generated using TypeDoc
Script integration with Twitter. The
updateStatus
method is a convenience method for posting a tweet, but the entire Twitter API can be used with the request method, which handles OAuth authentication and authorization.Example