2017-05-27 13 views
1

Facebookに接続するための非常に単純なアプリケーションをMule経由でビルドしようとしました。 私はこのデモを追っ:enter link description hereMule Facebook Connectorエラー:「OAuth検証ツールを抽出できませんでした」

最終コンポーネントは次のようになります:私は、アプリケーションを実行し、URLを打ったら enter image description here

問題:http://localhost:1111/auth 私はブラウザに次のメッセージだ:

Could not extract OAuth verifier. 

また、私は、コンソールで次のエラーを取得する:

Root Exception stack trace: 
org.mule.security.oauth.exception.AuthorizationCodeNotFoundException 
    at org.mule.security.oauth.processor.ExtractAuthorizationCodeMessageProcessor.extractAuthorizationCode(ExtractAuthorizationCodeMessageProcessor.java:56) 
    at org.mule.security.oauth.processor.ExtractAuthorizationCodeMessageProcessor.process(ExtractAuthorizationCodeMessageProcessor.java:39) 
    at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27) 
    at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:108) 
    at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) 

完全な構成XML

<?xml version="1.0" encoding="UTF-8"?> 

<mule xmlns:json="http://www.mulesoft.org/schema/mule/json" xmlns:facebook="http://www.mulesoft.org/schema/mule/facebook" xmlns:http="http://www.mulesoft.org/schema/mule/http" 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" 
    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/current/mule-facebook.xsd 
http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd"> 
    <http:listener-config name="HTTP_Listener_Configuration1111" host="localhost" port="1111" doc:name="HTTP Listener Configuration"/> 
    <facebook:config-with-oauth name="Facebook" consumerKey="111974699389920" consumerSecret="7406759445e528542668752d135c422a" doc:name="Facebook"> 
     <facebook:oauth-callback-config domain="localhost" localPort="1111" remotePort="1111" path="/*"/> 
    </facebook:config-with-oauth> 
    <flow name="facebookFlow"> 
     <http:listener config-ref="HTTP_Listener_Configuration1111" path="/auth" doc:name="HTTP"/> 
     <facebook:authorize config-ref="Facebook" doc:name="Facebook"/> 
     <choice doc:name="Choice"> 
      <when expression="#[flowVars.OAuthAccessTokenId != null]"> 
       <logger level="INFO" doc:name="Logger" message="Authorization is done succefully"/> 
       <set-payload doc:name="Set Payload" value="Facebook Authorization Successful"/> 
       <json:object-to-json-transformer doc:name="Object to JSON"/> 
      </when> 
      <otherwise> 
       <logger level="INFO" doc:name="Logger" message="Authorization Failed"/> 
       <set-payload doc:name="Set Payload" value="Facebook Authorization Failed"/> 
      </otherwise> 
     </choice> 
    </flow> 
</mule> 

この問題の原因は何ですか?どのようにそれを避けるために??

答えて

0

http listener urlをコールバックURLではなくヒットする必要があります。

リスナーURL:http://localhost:1111 - アプリケーションの実行後にこれを使用します。 コールバックURL:http://localhost:1111/auth

助けてくれたらお知らせください。

アマン。

+0

私が正しく理解していれば、http:// localhost:1111を押してください。何も変えずに試しましたが、「OAuthベリファイアを抽出できませんでした」 –

0

Google Spreadsheetsを呼び出すMuleのフロー用にOAuth2を設定するときに同じエラーメッセージが表示されました。

APIからクライアントIDとシークレットをコピーして貼り付けると、認証に失敗する可能性のある先頭または末尾のスペースが追加されることがあります。

フローのメッセージソースとして持っているHTTPリスナー要素のURLを押す必要があります。アクセスしているAPIは、認証が成功した後にコールバックURLにリダイレクトする必要があります。これらの調整は私のために働いた、彼らが助けて欲しい!

関連する問題