microsoft / BotFramework-WebChat

A highly-customizable web-based client for Azure Bot Services.
https://www.botframework.com/
MIT License
1.58k stars 1.53k forks source link

Set User Avatar based on user login. #1893

Closed Edwardfelix08 closed 5 years ago

Edwardfelix08 commented 5 years ago

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

stevkan commented 5 years ago

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.