1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2026-05-22 10:05:29 +02:00
Files
OpenIntegrations/docs/en/md/Twitter/Tweets/Create-poll-tweet.md
T
2024-08-14 09:06:31 +03:00

1.2 KiB

sidebar_position
sidebar_position
5

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 Authorization JSON or path to .json

Returns: Map Of KeyAndValue - serialized JSON response from Twitter


  
  OptionArray = New Array;
  OptionArray.Add("Good");
  OptionArray.Add("Nothing special");
  OptionArray.Add("Bad");
  
  Response = OPI_Twitter.CreatePollTweet("How are you?", OptionArray, 60, Parameters);
  Response = OPI_Tools.JSONString(Response);
    
  oint twitter CreatePollTweet --text %text% --options %options% --duration %duration% --auth %auth%

{
  "data": {
  "text": "How are you?",
  "id": "1746082302268969388",
  "edit_history_tweet_ids": [
  "1746082302268969388"
  ]
  }
  }