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 "TestTweet390c0ebb-bf19-4a84-9d37-a8eb8cc11874" \
--auth "{'redirect_uri':'https://api.athenaeum.digital/opi/hs/twitter','client_id':'***','client_secret':'***','access_token':'***','refresh_token':'***','oauth_token':'***','oauth_token_secret':'***','oauth_consumer_key':'***','oauth_consumer_secret':'***'}"
Result
{
"data": {
"edit_history_tweet_ids": [
"1843891450397839870"
],
"text": "TestTweeteea716eb-0e64-4c2d-b9c9-fb3cca5c6c4e",
"id": "1843891450397839870"
}
}