C# Microsoft Bot框架-Facebook身份验证、帐户链接

C# Microsoft Bot框架-Facebook身份验证、帐户链接,c#,facebook-graph-api,botframework,C#,Facebook Graph Api,Botframework,我想通过bot授权用户,并在聊天时从数据库中获取适当的信息。 用户已使用facebook帐户注册到我的网站数据库 到目前为止,我有: var resultMessage = context.MakeMessage(); resultMessage.Type = "message"; resultMessage.Attachments = new List<Attachment>(); List<Car

我想通过bot授权用户,并在聊天时从数据库中获取适当的信息。 用户已使用facebook帐户注册到我的网站数据库

到目前为止,我有:

   var resultMessage = context.MakeMessage();
            resultMessage.Type = "message";
            resultMessage.Attachments = new List<Attachment>();
            List<CardAction> cardButtons = new List<CardAction>();
            List<CardAction> plButton = new List<CardAction>();
            plButton.Add(new CardAction
            {
                Value = "myurl/link",
                Type = "signin",
                Title = "LogIn"
            });



            SigninCard plCard = new SigninCard("You need to authorize me", plButton);
            Attachment plAttachment = plCard.ToAttachment();
            resultMessage.Attachments.Add(plAttachment);
public Uri link(string resource, string clientId, Uri redirectUri, User userId, string extraQueryParameters)
{

  return redirectUri;
}
但这是不对的

  • 我应该发送什么参数
  • 如何处理
  • 如何再次重定向Facebook Messenger上的用户
  • 如何进行身份验证并将(存储的)用户数据从我的数据库获取到bot中

提前感谢您的回复

你想通过Facebook认证还是通过什么认证?我补充了一个问题。现在应该清楚了。那么您想根据您的数据库对用户进行身份验证吗?那么你怎么知道用户是谁呢?你有身份提供者吗?你使用oAuth吗?还不清楚…我想检查我的数据库中是否存在用户。如果存在,则将适当的数据输入bot。诸如此类。你在那里遇到了什么问题?你试过什么?根据你的解释,这看起来像是对数据库的一个简单调用。你想通过Facebook还是什么进行身份验证?我补充了一个问题。现在应该清楚了。那么您想根据您的数据库对用户进行身份验证吗?那么你怎么知道用户是谁呢?你有身份提供者吗?你使用oAuth吗?还不清楚…我想检查我的数据库中是否存在用户。如果存在,则将适当的数据输入bot。诸如此类。你在那里遇到了什么问题?你试过什么?根据您的解释,这似乎是对DB的一个简单调用。。