---
sidebar_position: 4
description: Create gif tweet and other functions to work with Twitter in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Twitter]
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Create gif tweet
 Creates a tweet with a gif attachment



`Function CreateGifTweet(Val Text, Val GifsArray, Val Parameters = "") Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Text | --text | String | &#x2714; | Tweet text |
  | GifsArray | --gifs | Array of String, BinaryData | &#x2714; | Gif files array |
  | Parameters | --auth | Structure Of String | &#x2716; | Authorization data. See GetStandardParameters |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Twitter

:::tip
Parameters with Binary data type can also accept file paths on disk and URLs
:::
<br/>


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

    GIF  = "https://hut.openintegrations.dev/test_data/animation.gif"; // URL, Binary or File path
    Gif2 = "https://hut.openintegrations.dev/test_data/animation.gif"; // URL, Binary or File path

    GifsArray = New Array;
    GifsArray.Add(GIF);
    GifsArray.Add(Gif2);

    Result = OPI_Twitter.CreateGifTweet(Text, GifsArray, Parameters);

    Text   = "TestTweet" + String(New UUID);
    Result = OPI_Twitter.CreateGifTweet(Text, GIF, Parameters);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            # JSON data can also be passed as a path to a .json file
            
            oint twitter CreateGifTweet \
             --text "TestTweet37e765c4-f035-4db8-aab5-d4c5cb1ff07b" \
             --gifs "/tmp/dmb5svix.qsp" \
             --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':'***'}"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            :: JSON data can also be passed as a path to a .json file
            
            oint twitter CreateGifTweet ^
             --text "TestTweet37e765c4-f035-4db8-aab5-d4c5cb1ff07b" ^
             --gifs "/tmp/dmb5svix.qsp" ^
             --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':'***'}"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "title": "Too Many Requests",
 "detail": "Too Many Requests",
 "type": "about:blank",
 "status": 429
}
```
