Closed samuelguesnier closed 6 years ago
You should simply do:
BotBuilder > FBProfile > Message
In you message don't set the msg
part only {user.profile.first_name}
the {} works on the object in the flow.
By the way you should pipe: BotBuilder > DB Get User > Profile > FBProfile > DB Save User > Message
Use user.id
as key to retrieve the user from database. later you can set data in the user profile and retrieve it that way.
Ho great ! It works :)
By the way you should pipe: BotBuilder > DB Get User > Profile > FBProfile > DB Save User > Message Use user.id as key to retrieve the user from database. later you can set data in the user profile and retrieve it that way.
I'm not sure to understand : The message received is piped to Get User to verify if the user is in the databse, if yes we put it in Profile, if not we parse the Data with FB Profile , then we save it in the DB and finally we can send the message ?
if yes we put it in Profile, if not we parse the Data with FB Profile ,
We merge the user (or not) retrieve from db with the profile from bot builder then we merge it with it's facebook profile (with more data) then we save it yes
The FBProfile has an internal timeout to avoid requesting user data for each message
Humm ok , and also, can I ask you why 2 profiles nodes is needed ? Is it because the messange can income from multiples sources like skype ?
The first profile node is an all purpose profile working with all BotBuilder channels. The Facebook Profile will query facebook to get more data
Ho, ok I see. Thank you JP :+1:
Hi, I'm trying to display the user's name who is talking to the bot. here is the schema https://image.noelshack.com/fichiers/2017/42/3/1508324113-capture-du-2017-10-18-12-54-56.png The code in function "get name" is : msg.payload = msg.user.profile.first_name; return msg;
The function return the name, but I can't send it back to the user, because in send message {msg.payload} display nothing. So it just send "hi" Someone can help me ? Thanks