1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-05-29 23:17:45 +02:00
OpenIntegrations/docs/en/md/Twitter/Tweets/Create-text-tweet.mdx
Vitaly the Alpaca (bot) c12aa84c7a Main build (Jenkins)
2025-01-10 12:07:46 +03:00

71 lines
2.1 KiB
Plaintext
Vendored

---
sidebar_position: 2
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# 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
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Parameters = GetTwitterAuthData();
Text = "TestTweet" + String(New UUID);
Result = OPI_Twitter.CreateTextTweet(Text, Parameters);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
# JSON data can also be passed as a path to a .json file
oint twitter CreateTextTweet \
--text "TestTweetd71fdcfe-05e5-4976-8067-caced82e3dfd" \
--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':'***'}"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
:: JSON data can also be passed as a path to a .json file
oint twitter CreateTextTweet ^
--text "TestTweetd71fdcfe-05e5-4976-8067-caced82e3dfd" ^
--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':'***'}"
```
</TabItem>
</Tabs>
```json title="Result"
{
"data": {
"edit_history_tweet_ids": [
"1843891450397839870"
],
"text": "TestTweeteea716eb-0e64-4c2d-b9c9-fb3cca5c6c4e",
"id": "1843891450397839870"
}
}
```