Unofficial Content

This article focuses on what Twitter external object does and gives an example of how to use it.

Step 1: External Object

Take a look to Twitter external object.

Step 2: Code Sample

Create the following Panel for Smart Devices.

Layout

TwitterAPI_Layout - GeneXus 15

Variables

&Image : Image data type

Events

Event 'Tweet'
     Composite
        If &Image.IsEmpty()
            Twitter.Tweet("My GeneXus app tweet this!")
        Else
            Twitter.Tweet('My GeneXus app tweet this with an image attached!', &Image)
        EndIf
    EndComposite
Endevent

Event 'Follow GX'
     Twitter.Follow("@GeneXus")
EndEvent

Step 3: Execution

First, the user can select an image for the &Image variable

TwitterAPI_Image1 TwitterAPI_Image2 TwitterAPI_Image3

Then, just tap the Tweet button. This will open a Twitter application dialog with the text and image selected, and a button Send available to finish the tweet publication.
Note: The message can be modified in this dialog before sending it.

TwitterAPI_Image4

Optionally, the end user can tap over "Follow GX to follow @GeneXus account.

 

  





Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant