Skip to content

Instantly share code, notes, and snippets.

@ricston-git
Last active August 29, 2015 13:57
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 ricston-git/9810033 to your computer and use it in GitHub Desktop.
Save ricston-git/9810033 to your computer and use it in GitHub Desktop.
<spring:beans>
<spring:bean id="tokenObjectStore"
class="org.mule.util.store.SimpleMemoryObjectStore" />
</spring:beans>
<facebook:config-with-oauth name="FacebookConfig"
consumerKey="${fb.appId}" consumerSecret="${fb.appSecret}">
<facebook:oauth-callback-config domain="${fb.domain}"
localPort="${fb.localport}" remotePort="${fb.remoteport}" path="${fb.path}" />
<facebook:oauth-store-config objectStore-ref="tokenObjectStore" />
</facebook:config-with-oauth>
<facebook:config-with-oauth name="FacebookConfig"
consumerKey="${fb.appId}" consumerSecret="${fb.appSecret}">
<facebook:oauth-callback-config domain="${fb.domain}"
localPort="${fb.localport}" remotePort="${fb.remoteport}" path="${fb.path}" />
</facebook:config-with-oauth>
<flow name="authorizingFlow">
<http:inbound-endpoint host="localhost" port="8081"
path="authorize" />
<facebook:authorize config-ref="FacebookConfig" />
</flow>
<flow name="postStatusFlow">
<http:inbound-endpoint exchange-pattern="request-response"
host="localhost" port="8081" path="postStatus" />
<facebook:logged-user-details config-ref="FacebookConfig" />
<facebook:publish-message config-ref="FacebookConfig"
msg="This is my message." profile_id="#[payload.Username]" />
</flow>
<facebook:logged-user-details config-ref="FacebookConfig" />
<facebook:publish-message config-ref="FacebookConfig"
msg="This is my message." profile_id="#[payload.Username]" />
</flow>
<flow name="facebookFlow" doc:name="facebookingFlow">
<http:inbound-endpoint exchange-pattern="request-response"
host="localhost" port="8081" path="authorize" />
<facebook:authorize config-ref="FacebookConfig" />
<facebook:logged-user-details config-ref="FacebookConfig" />
<facebook:publish-message config-ref="FacebookConfig"
msg="This is my message." profile_id="#[payload.Username]" />
</flow>
<facebook:config-with-oauth name="FacebookConfig"
appId="${fb.appId}" appSecret="${fb.appSecret}">
<facebook:oauth-callback-config domain="${fb.domain}"
localPort="${fb.localport}" remotePort="${fb.remoteport}" path="${fb.path}" />
</facebook:config-with-oauth>
<flow name="facebookingFlow">
<http:inbound-endpoint host="localhost" port="8081"
path="authorize" />
<facebook:authorize config-ref="FacebookConfig" />
<facebook:logged-user-details config-ref="FacebookConfig"
accessTokenId="#[flowVars['OAuthAccessTokenId']]" />
<facebook:publish-message config-ref="FacebookConfig"
accessTokenId="#[flowVars['OAuthAccessTokenId']]"
msg="This is my message." profile_id="#[payload.Username]" />
</flow>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment