Skip to main content

Create text tweet

Creates a tweet without attachments

Function CreateTextTweet(Val Text, Val Parameters = "") ExportReturn CreateCustomTweet(Text, , , , Parameters);EndFunction

ParameterCLI optionTypeRequiredDescription
Text--textStringTweet text
Parameters--authStructure Of StringAuthorization data. See GetStandardParameters

Returns: Map Of KeyAndValue - serialized JSON response from Twitter


1C:Enterprise/OneScript code example
    Parameters = GetTwitterAuthData();
Text = "TestTweet" + String(New UUID);

Result = OPI_Twitter.CreateTextTweet(Text, Parameters);
    # JSON data can also be passed as a path to a .json file

oint twitter CreateTextTweet \
--text "TestTweet8f38b669-1837-4a8a-b3f6-3c3ad908da3c" \
--auth "{'redirect_uri':'https://hut.openintegrations.dev/melezh/6ad91cc8b','client_id':'***','client_secret':'***','access_token':'***','refresh_token':'***','oauth_token':'***','oauth_token_secret':'***','oauth_consumer_key':'***','oauth_consumer_secret':'***'}"
Result
{
"title": "Too Many Requests",
"detail": "Too Many Requests",
"type": "about:blank",
"status": 429
}