Skip to content

Instantly share code, notes, and snippets.

@luisffc
Created April 25, 2016 02:43

Revisions

  1. luisffc created this gist Apr 25, 2016.
    25 changes: 25 additions & 0 deletions muleface.xml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    <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>