私はsample auth linking Roku channelを動作させようとしています。 Rokuスティックにチャンネルをインストールし、トークンの生成と認証のためのエンドポイントを設定しましたが、切断エンドポイントを動作させることはできません。 Roku Developer Documentation on Authentication and Linkingも役に立たない。なぜなら、そのページの回答は私のアプリケーションから実際に返されたものと一致しないからだ。Rokuチャンネルで切断しようとするとエラーが発生します
次のようになり切断する私のコード:私のアプリケーションからそう
sub parseDis(job as object)
result = job.context.context.response
json = parseJSON(result.content)
if json.success = "no"
m.top.disconnect = false
else
m.top.disconnect = true
end if
end sub
を、私はこのようになりますJSONレスポンスを返しています:
{
"success": "yes"
}
しかし、Telnetのデバッグコンソールセッションで私はこの出力を得ます:
Suspending threads...
Thread selected: 2* ...:/components/RegistryTask.xml(55)
Current Function:
052: sec.Write(key, val)
Function RegWrite(key, val, section=invalid)
053: if section = invalid then section = "Default"
054: sec = CreateObject("roRegistrySection", section)
055:* sec.Write(key, val)
056: sec.Flush() 'commit it
057: End Function
Type Mismatch. (runtime error &h18) in pkg:/components/RegistryTask.xml(55)
055: sec.Write(key, val)
Backtrace:
#1 Function regwrite(key As Dynamic, val As Dynamic) As Dynamic
file/line: pkg:/components/RegistryTask.xml(55)
#0 Function go() As Void
file/line: pkg:/components/RegistryTask.xml(35)
Local Variables:
key roString refcnt=3 val:"UNIQUE_ID_HERE3500X"
val Invalid
section String (VT_STR_CONST) val:"Default"
global Interface:ifGlobal
m roAssociativeArray refcnt=3 count:3
sec bsc:roRegistrySection refcnt=1
Threads:
ID Location Source Code
0 pkg:/source/main.brs(15) msg = wait(0, m.port)
1 pkg:/components/SimpleScene.brs(78) oauth_token: invalid
2* ...:/components/RegistryTask.xml(55) sec.Write(key, val)
3[u] ??
*selected [u]unattached(not debuggable)
何が起きているのか解読を助けることができる人間違っている?