Interact with Twitter

13 May 2016

  • Release 9.75 - added.
twitter (Commands)
TypeCorrade progressive command
Commandtwitter
DescriptionThe twitter command can make Corrade interact with a twitter application.
Permissionstalk
Parametersgroup, password, action, key, secret, token, access
Last ChangesRelease 9.75 - added.

The twitter command allows you to interact with Twitter through Corrade.

Command Required Parameters Required Corrade Permissions Example
twitter group, password, action, key, secret, token, access talk
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // Tweet the message "Good day!"
            "command", "twitter",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "action", "tweet",
            // The consumer key.
            "key", "tDlvUCmuxDEav27y68rLgkOX1",
            // The consumer secret.
            "secret", "xz3iO1qHqsgcqOgUl2RP0NHQZLjjlNitsMBA2xgldFkvYabJDA",
            // The access token.
            "token", "2469111024-xkB3cUuMRQiQVFIPnJrtivo14WSVfStdXQPa9ow",
            // The access token secret.
            "access", "8FAAUKyk00DGOLWayeubxRU1bG26FGYMmE3Q92ONTxtXy",
            "message", wasURLEscape("Good day!"),
            "callback", wasURLEscape(URL)
        ]
    )
);
Parameter Possible Value Description
action tweet Post a message to Twitter.

Tutorial

In order to be able to post messages to twitter using an application, first navigate to the Twitter development applications page and create a new application. You can fill in the various details as you wish.

After that, in the Keys and Access Tokens section of your newly created application, note down the:

  • Consumer Key (API Key) - will need to be sent by the script as the key parameter.
  • Consumer Secret (API Secret) - will need to be sent by the script as the secret parameter.

and press the generate access tokens button. After that, note down two more bits of information:

  • Access Token - will need to be sent by the script as the token parameter.
  • Access Token Secret - will need to be sent by the script as the access parameter.

and make sure that Access Level is set to both Read and Write.

After that, you are ready to post messages to Twitter. For instance, the script:

llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            "command", "tweet",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "action", "tweet",
            "key", "tDlvUCmuxDEav27y68rLgkOX1",
            "secret", "xz3iO1qHqsgcqOgUl2RP0NHQZLjjlNitsMBA2xgldFkvYabJDA",
            "token", "2469111024-xkB3cUuMRQiQVFIPnJrtivo14WSVfStdXQPa9ow",
            "access", "8FAAUKyk00DGOLWayeubxRU1bG26FGYMmE3Q92ONTxtXy",
            "message", wasURLEscape("Good day!"),
            "callback", wasURLEscape(URL)
        ]
    )
);

will post the message Good day!.


secondlife/scripted_agents/corrade/api/progressive/commands/twitter.txt · Last modified: 2017/02/22 18:27 (external edit)

Access website using Tor


For the copyright, license, warranty and privacy terms for the usage of this website please see the license and privacy pages.