尝试通过Microsoft Bot Framework在FaceBook Messenger上实现帐户链接 . 这就是我做的 . 在botframework上托管了一个Bot,它发送了一张登录牌 .

var msg = new builder.Message(session)
    .attachments([
        new builder.SigninCard(session)
            .text("Click below to Sign in.")
            .button("Connect with Me", "https://6493.ngrok.io/login")
    ]); session.send(msg);

我的想法是最终用SSO支持的Web URL替换 https://6493.ngrok.io/login URL .

https://6493.ngrok.io/login 是一个示例node.js应用程序,它具有get - > / login和post - > / login.get - > login的实现,向用户显示登录表单 . 接受用户名/ pwd.post - >登录,当用户在登录表单上提交时,我会使用 authorization_code 和从传入查询字符串中选取的account_linking_token重定向到facebook messenger .

这是我看到的问题 .

单击连接按钮时,

  • URL https://6493.ngrok.io/login已启动,但它没有,如文档中提到的account_linking_token和redirect_uri .

  • URL启动我没有这个信息来发回有效的account_linking_token . 我认为facebook想要一个基于Web的授权网址 .