In a previous post, I provided a demo on how to use the Facebook Connector. Here, I describe briefly how you can use your own custom object store to save the access token rather than relying on the Connector’s default object store.

To enable your custom object store, you only need to add an element within the Facebook config that refers to the object store, as shown below:

Through this configuration, the Connector can save to, and retrieve from the custom object store automatically without any modification to the rest of your flow.

Note that in the above flow an in-memory object store is configured. Since this object store is in memory, it will be lost if the Mule application is shut down. In this case, the application will have to go through the authorization step again when restarted.

The type of object store that you would use is highly dependent on your application. However, it is suggested that you use a persistent one to cater for scenarios where the application unexpectedly stops. You can find out more about object stores in this documentation page.

(This blog post first published; 15th April 2014 on

Share This