"Username is sent to the bot whenever a user sends a message to the bot. Here is how you can access the username.
1. If using the hosted code , you can extract it out of the event object. Use the below code to get the user name.
""event.senderobj.display"".
2. If using the callback , then this is sent inside the additional parameter called 'senderobj' . Parse out the field called 'display' from the 'senderobj' to get the username.
Sample:
senderobj = {""channelid"": ""195173021"",""channeltype"": ""fb"", ""display"": ""John""}"
Comments
0 comments
Please sign in to leave a comment.