我已經成功實施了帳戶鏈接,但是不會將任何訪問權限提交到我的履行終點。
發送到我的履行終點的json中的AccessToken字段爲空。未接收訪問令牌
的Json接收到履行
Array
(
[user] => Array
(
[userId] => 1502895338751
[locale] => en-US
)
[conversation] => Array
(
[conversationId] => 1502895338751
[type] => ACTIVE
[conversationToken] => {"state":null,"data":{}}
)
[inputs] => Array
(
[0] => Array
(
[intent] => actions.intent.TEXT
[rawInputs] => Array
(
[0] => Array
(
[inputType] => KEYBOARD
[query] => talk to APPNAME
)
)
[arguments] => Array
(
[0] => Array
(
[name] => text
[rawText] => talk to APPNAME
[textValue] => talk to APPNAME
)
)
)
)
[surface] => Array
(
[capabilities] => Array
(
[0] => Array
(
[name] => actions.capability.AUDIO_OUTPUT
)
[1] => Array
(
[name] => actions.capability.SCREEN_OUTPUT
)
)
)
[device] => Array
(
)
[isInSandbox] => 1
)
不太清楚在這一點上做的,現在困在這裏了一個多星期。我接觸AOG支持,但他們不似乎已瞭解了我嘗試說:/
從履行我的回答如果的accessToken沒有找到
header('Content-Type: application/json');
$askToken = array (
'conversationToken' => '{"state":null,"data":{}}',
'expectUserResponse' => true,
'expectedInputs' =>
array (
0 =>
array (
'inputPrompt' =>
array (
'initialPrompts' =>
array (
0 =>
array (
'textToSpeech' => 'PLACEHOLDER_FOR_SIGN_IN',
),
),
'noInputPrompts' =>
array (
),
),
'possibleIntents' =>
array (
0 =>
array (
'intent' => 'actions.intent.SIGN_IN',
'inputValueData' =>
(object) array (
),
),
),
),
),
);
echo json_encode($askToken);
exit();
你是如何請求帳戶鏈接(顯示代碼或屏幕截圖),並且這是否正常工作?您能否顯示操作控制檯的帳戶鏈接部分的屏幕截圖? – Prisoner
是的,我的OAUTH2.0服務器工作完美(通過Google OAUTH Playground測試)。我只是在模擬器上測試時沒有獲得用戶的任何登錄選項。 – Elo97234c
你使用API.AI還是gactions?你如何觸發登錄? – Prisoner