Business Intelligence & Business Analytics Blog

Facebook and Pentaho Data Integration

Step 2: Follow Instructions to setup your unique username

Add your own – or accept the defaults.

Step 3: Create a Facebook Application

Allow “Developer” access to your basic information.

After you allow access to the Developer App – go back here: if it does not redirect you.

Create Application

Security Check

Verify Information

Click Web Site

Note your application ID and Application Secret


Application ID: xxxxxxxxxxxxxxx
Application Secret: yyyyyyyyyyyyyyyyyyyyy
Enter your Site URL and Site Domain, this can be pretty much anything, but attempt to use your real information if available.

Note Settings, App ID, API Key and App Secret

Below summarizes those steps:

Step 4: Obtain Permanent OAUTH Access Token:

Create and execute the below URL in your browser: Modify the below URL to use your client_id and redirect_uri – see notes in blog post link above set permission values accordingly. (

Your client_id is your App ID and the redirect_uri can be anything.

Sample URL:…&redirect_uri=,

Constructed URL:,offline_access, publish_stream,create_event,rsvp_event,sms,publish_checkins,manage_friendlists,

You will get the following screen – yours might be different depending on what permissions you selected – make sure at least that “Post to my Wall” is there. If not verify your permissions based of off the permission link in the blog post.

Click Allow:

Now note the URL that was created in the browser address bar and that you were redirected to your page that you placed in the redirect_url.

You need the code value.

The code parameter will be a very lengthy string of random characters. Copy this value and hang on to it for the construction of a new URL.

This URL will turn the generated code into a valid access token for your application.

Sample of what is returned: Example: fdfdfdfdfrert-8Qoj7wFkUqoCKWSEk89aCwd2zM.eyJpdiI6IjczU2YwUVJmaUJocXJjM1plOUdzVVEifQ.psncSCrwu-1659AZCHd7UBpUdBYdKCmvwXSu2-WxLcxfRt6wtwKzcjYkblwshjbnRX0EhcSrbG_U83AOv9pDrfomcLB8SY3gH1VW083oM997NqM28czfxxxrrer

Now Create the Following:

Fill in your application ID, application secret, redirect uri, and the code we just copied. Again, ours looks like this:


You will get back an access token:


Now you should be able to use PDI and the HTTP POST step using the various Facebook GRAPH APIs to do things: such as posting content to the Facebook wall / news feed and etc.

Step 5: Created a PDI Transformation using the HTTP POST step and the Facebook Graph API with /PROFILE_ID/feed

  1. Create a new Transformation
  2. Use a Generate Rows Step (found under Input) to set the various Facebook parameter names that can be found here
  4. Make sure to use the access_token parameter and value you got from the steps above

  5. Add HTTP Post step (found under Lookup) and connect hop from Generate Rows

  6. Configure the HTTP Post step to use the feed RESTful service
  7. Refer to Publishing section for list of methods
  8. Replace mpentaho with your unique user name you set up earlier
  9. Jump to the Fields tab and click “Get Fields” under the “Query parameter” panel

  10. Click OK, Save and right click on the HTTP Post Step and select Preview, then Quick Launch

  11. In a few seconds a panel should come up displaying your data
  12. Check the result column (at the end) and look for a return code such as:
  13. Example: {“id”:”100002640151006_100565053374833″}
  14. Check your newly created Facebook account wall and you should see your post Fig. 1
  15. If not check your Facebook account security and application privacy settings to ensure the application has access.

Comments powered by CComment