Skip to content

Instantly share code, notes, and snippets.

@luisffc
Created April 25, 2016 02:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luisffc/10b7dfe189a006572c2eaa336d0712a7 to your computer and use it in GitHub Desktop.
Save luisffc/10b7dfe189a006572c2eaa336d0712a7 to your computer and use it in GitHub Desktop.
Get Facebook posts using Mule ESB
<facebook:config-with-oauth name="Facebook"
consumerKey="${consumerKey}" consumerSecret="${consumerSecret}"
doc:name="Facebook" scope="user_posts">
<facebook:oauth-callback-config domain="localhost"
localPort="${http.port}" remotePort="${http.port}" path="fbcallback" />
</facebook:config-with-oauth>
<http:listener-config name="HTTP_Listener_Configuration"
host="localhost" port="${http.port}" doc:name="HTTP Listener Configuration" />
<flow name="facebookAuthorizeFlow">
<http:listener config-ref="HTTP_Listener_Configuration"
path="/fbauthorize" doc:name="HTTP" />
<facebook:authorize config-ref="Facebook" doc:name="Auhtorize" />
<flow-ref name="getUserPostsFlow" doc:name="callFlow" />
</flow>
<flow name="getUserPostsFlow">
<http:listener config-ref="HTTP_Listener_Configuration"
path="/posts" doc:name="HTTP" />
<facebook:get-user-posts config-ref="Facebook"
since="last year" user="me" doc:name="Get User Posts" />
<json:object-to-json-transformer
doc:name="Object to JSON" />
</flow>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment