BotFramework-WebChat icon indicating copy to clipboard operation
BotFramework-WebChat copied to clipboard

Set User Avatar based on user login.

Open Edwardfelix08 opened this issue 7 years ago • 1 comments

I have developed a chat bot using Microsoft Bot Framework V4, and have used BotFramework-WebChat for providing the user to chat from website using DirectLine Token,

I am able to set the bot avatar and the user avatar by assigning the static public image URL. The problem is that I want to set the user avatar dynamically in the WebChat using below steps

Fetch the user icon using the Microsoft graph API after OAuthCard login Set the signed in user image in the Webchat styleSetOptions dynamically. I have gone through the Demo for setting the bot framework server and the webchat for the bot by following the samples provided

bot server == https://github.com/Microsoft/BotBuilder-Samples

webchat == https://github.com/Microsoft/BotFramework-WebChat

but there is no proper example or documentation on how to set the user image after the user has signed in. using the signed user object.

Thanks in advance

Edwardfelix08 avatar Apr 12 '19 10:04 Edwardfelix08

Hi @Edwardfelix08, please look over the answer I provided on Stack Overflow, located here, on how this can be accomplished.

The solution provided on Stack Overflow addresses the same issue presented here. Therefore, I am closing this issue.

stevkan avatar Apr 24 '19 09:04 stevkan