How to display a welcome message from my Bot using Microsoft Bot Framework

前端 未结 2 1481
离开以前
离开以前 2021-01-21 06:39

I want to display a welcome message whenever someone connects to my bot. I\'ve used the technique from the demo-ContosoFlowers sample on github (https://github.com/Microsoft/Bot

2条回答
  •  借酒劲吻你
    2021-01-21 07:19

    Create a class and have this in you callback url of fb. FacebookProfile is my class that holds the name and other information after the call.

     public static async Task GetFacebookProfile(string accessToken)
                {
                    var uri = GetUri("https://graph.facebook.com/v2.6/me",
                        Tuple.Create("fields", "name,email,id,first_name,last_name"),
                        Tuple.Create("access_token", accessToken));
    
                    var res = await FacebookRequest(uri);
                    return res;
                }
    

提交回复
热议问题