我正在尝试在 mule 中使用 facebook 连接器,我有 2 个流程,一个用于授权,另一个用于在 facebook 中发布一个简单的文本。问题是授权我的程序后,我丢失了accessTokenID,并且无法保存。
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:json="http://www.mulesoft.org/schema/mule/json" xmlns:facebook="http://www.mulesoft.org/schema/mule/facebook" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/facebook http://www.mulesoft.org/schema/mule/facebook/2.0/mule-facebook.xsd
http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd">
<facebook:config-with-oauth name="Facebook" appId="appID" appSecret="appSecret" doc:name="Facebook" scope="publish_stream">
<facebook:oauth-callback-config domain="${fullDomain}" localPort="${http.port}"/>
</facebook:config-with-oauth>
<flow name="Authorization" doc:name="Authorization">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="${http.port}" doc:name="HTTP"/>
<facebook:authorize config-ref="Facebook" doc:name="Facebook"/>
<set-session-variable doc:name="Save Access Token" value="\#[flowVars['OAuthAccessTokenId']]" variableName="accessTokenId"/>
<flow-ref name="posting" doc:name="post on facebook"/>
</flow>
<flow name="posting" doc:name="posting">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="${http.port}" path="post" doc:name="HTTP"/>
<facebook:publish-message config-ref="Facebook" msg="Hi, I am from Mule, where are you from?" profile_id="myprofileID" doc:name="Facebook" accessTokenId="\#[sessionVars['accessTokenId']]"/>
<json:object-to-json-transformer doc:name="Object to JSON"/>
</flow>
</mule>
这是我在 cloudhub 中遇到的错误:
********************************************************************************
Message : null
Code : MULE_ERROR--1
--------------------------------------------------------------------------------
Exception stack is:
1. null (org.mule.api.store.ObjectStoreNotAvaliableException)
com.mulesoft.ch.objectstore.proxy.ObjectStoreProxyImpl:59 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/store/ObjectStoreNotAvaliableException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
org.mule.api.store.ObjectStoreNotAvaliableException
at com.mulesoft.ch.objectstore.proxy.ObjectStoreProxyImpl.contains(ObjectStoreProxyImpl.java:59)
at com.mulesoft.ch.objectstore.ObjectStoreImpl.contains(ObjectStoreImpl.java:31)
at org.mule.module.facebook.oauth.FacebookConnectorOAuthClientFactory.makeObject(FacebookConnectorOAuthClientFactory.java:31)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************
任何人都可以帮助我吗?我认为会话变量不会被保存,但我无法证明这一点。提前致谢