You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2026-05-22 10:05:29 +02:00
1.3 KiB
1.3 KiB
sidebar_position
| sidebar_position |
|---|
| 6 |
Create poll tweet
Creates a tweet with a poll
Function CreatePollTweet(Val Text, Val OptionArray, Val Duration, Val Parameters = "") Export
| Parameter | CLI option | Type | Description |
|---|---|---|---|
| Text | --text | String | Tweet text |
| OptionArray | --options | Array of String | Poll options array |
| Duration | --duration | String, Number | Poll duration |
| Parameters | --auth | Structure Of String | Auth data or path to .json file |
Returns: Map Of KeyAndValue - serialized JSON response from Twitter
Parameters = GetTwitterAuthData();
Text = "TestTweet" + String(New UUID);
AnswersArray = New Array;
AnswersArray.Add("Option 1");
AnswersArray.Add("Option 2");
Result = OPI_Twitter.CreatePollTweet(Text, AnswersArray, 60, Parameters);
oint twitter CreatePollTweet --text %text% --options %options% --duration %duration% --auth %auth%
{
"data": {
"edit_history_tweet_ids": [
"1842575137553477975"
],
"text": "TestTweetcc7beeda-be3d-48bc-beb9-367085367836",
"id": "1842575137553477975"
}
}