Create text tweet
Creates a tweet without attachments
Function CreateTextTweet(Val Text, Val Parameters = "") ExportReturn CreateCustomTweet(Text, , , , Parameters);EndFunction
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
Text | --text | String | ✔ | Tweet text |
Parameters | --auth | Structure Of String | ✖ | Authorization 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);
- Bash
- CMD/Bat
# JSON data can also be passed as a path to a .json file
oint twitter CreateTextTweet \
--text "TestTweetf6f5a5f7-3421-477e-a184-869a5c819777" \
--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':'***'}"
:: JSON data can also be passed as a path to a .json file
oint twitter CreateTextTweet ^
--text "TestTweetf6f5a5f7-3421-477e-a184-869a5c819777" ^
--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
{
"data": {
"id": "1976383352677531763",
"edit_history_tweet_ids": [
"1976383352677531763"
],
"text": "TestTweet7214596f-dd90-4515-9b83-1b27c2784a1d"
}
}