Interact with Facebook

6 October 2016

  • Release 9.133 - The command now can take a path instead of a name.

14 May 2016

  • Release 9.76 - added support for uploading in-world image assets.

13 May 2016

  • Release 9.75 - added.
facebook (Commands)
TypeCorrade progressive command
Commandfacebook
DescriptionThe facebook command can make Corrade interact with a Facebook application.
Permissionstalk
Parametersgroup, password, token
Last ChangesRelease 9.133 - The command now can take a path instead of a name.

The facebook allows you to interact with Facebook through Corrade.

Command Required Parameters Required Corrade Permissions Example
facebook group, password, token talk
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // Posts the message "Good day!"
            // through the application using
            // the user's access key.
            "command", "facebook",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "action", "post",
            "token", "EAAP7Orwd8WMBAOTzJu7ZCRHHINaF2YcEYO0QRJNChhBTVZA8bnW2QwB4W7MUGSEzsrfrZCLo929GLdc9PhD1ZASEYmS04qB4gw97Rj4MKBjIEi7ZAHO2OgAshbe1nVKKXKPJ66KNzS4tSQ1X9xS9dlUP1SlozNNuZA9Rl1poEyZBwZAZA",
            "message", wasURLEscape("Good day!"),
            "callback", wasURLEscape(URL)
        ]
    )
);
Parameter Possible Value Second Parameter Description
action post message Post a message to a Facebook feed. In case item is also specified (an inventory or in-world texture referenced by path or UUID), then Corrade will post an image to the feed.
name
URL
description
item
Optional Parameter Possible Value Description
id A page or album ID Post a message to a Facebook page or album.

Tutorial

In order to be able to post to Facebook, you will need to create a new Facebook application (canvas is the way to go) and then use the Graph API Explorer to generate a user access key. When you generate a user access key, Facebook will ask you what permissions to grant your application - select the permissions, depending on your needs.

You can also then use the Facebook access token debugger in order to create a long-lived user access token. You would debug the currently created token and then press the Extend Access Token button.

After that, you can issue a command such as:

llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // Posts the message "Good day!"
            // through the application using
            // the user's access key.
            "command", "facebook",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "action", "post",
            "token", "EAAP7Orwd8WMBAOTzJu7ZCRHHINaF2YcEYO0QRJNChhBTVZA8bnW2QwB4W7MUGSEzsrfrZCLo929GLdc9PhD1ZASEYmS04qB4gw97Rj4MKBjIEi7ZAHO2OgAshbe1nVKKXKPJ66KNzS4tSQ1X9xS9dlUP1SlozNNuZA9Rl1poEyZBwZAZA",
            "message", wasURLEscape("Good day!"),
            "callback", wasURLEscape(URL)
        ]
    )
);

which will post the message Good day! to your own wall.

Corrade also supports posting to any page by specifying the optional parameter ID. For instance, the command:

llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // Posts the message "Good day!"
            // to the page id ''8453753863''.
            "command", "facebook",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "action", "post",
            "id", "8453753863",
            "token", "EAAP7Orwd8WMBAOTzJu7ZCRHHINaF2YcEYO0QRJNChhBTVZA8bnW2QwB4W7MUGSEzsrfrZCLo929GLdc9PhD1ZASEYmS04qB4gw97Rj4MKBjIEi7ZAHO2OgAshbe1nVKKXKPJ66KNzS4tSQ1X9xS9dlUP1SlozNNuZA9Rl1poEyZBwZAZA",
            "message", wasURLEscape("Good day!"),
            "callback", wasURLEscape(URL)
        ]
    )
);

will post the message Good day! to the page ID 8453753863.


secondlife/scripted_agents/corrade/api/progressive/commands/facebook.txt ยท Last modified: 2017/02/22 18:29 (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.