Update your Facebook status

In this tutorial, you'll learn how to build a Choreo against a very popular API - Facebook. The Choreo that we're going to build is one that lets you update your Facebook status.

Get Set Up

1Make sure you have a Temboo account. If you don't already have one, you can register for a free account here.

2Download and install Twyla for Mac or Windows. For information about how to obtain the Twyla installer, please contact support@temboo.com

3Next, you'll need to register an application using the Facebook dev console.

4To make an API call to Facebook via your new app, you'll need an OAuth Access Token. Temboo makes it easy to get your hands on one. With your Facebook application in place, visit the Facebook > OAuth bundle. Starting with the InitializeOAuth Choreo, use these Choreos to grant your Facebook application access to post to Facebook on your behalf. This short video demonstrates how to use our OAuth Choreos, and it's a good idea to take a break and watch it now before you dive into this step. You'll need the access token returned by this process to proceed with this tutorial.

Posting to Facebook

Once you've got a valid Facebook OAuth access token, we can get started building our Choreo.

1Drag a HTTP Request Step from the steps pallette to the canvas. Connect the Begin Step to your new HTTP Request Step.

Making a connection between the Begin step and the HTTP Request step

2Double click the HTTP Request Step to open the step property editor. On the Server tab, configure the URL field with the appropriate Facebook URL. In this case, we'll use the endpoint below to post to a Facebook feed:


Configuring the Facebook endpoint in the HTTP Request step

3On the Request tab, specify an "access_token" and "message" HTTP parameter. You can create new local input variables if you want to pass these in dynamically (we created two String input variables called AccessToken and Message). Then, choose POST as opposed to GET from the HTTP Method drop-down menu above the variables.

Configuring the Request tab in the HTTP Request step

4Create a new output variable called Response. Make sure its type is set to File.

The Response output variable

5Back in the HTTP Request step, on the Response tab, specify the new output variable in the Store Retrieved Data In field.

Configuring the Response tab in the HTTP Request step

6That's it. Now you can switch to Test mode and try it out. We used two input variables so we have to add our access token and our message here, as shown in the screenshot below. When you hit Start, the Choreo will post a message to Facebook and store the response in the Response variable that we created in step 4. Highlighting the Response variable in the output log will show you the details of the response from the Facebook API.

Running the finished Facebook Choreo in Test mode

Need Help?

We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.