I have created a chatbot and successfully tried to pass an GIF image through a card response. However, the response is very well viewed on DialogFlow but the Chatbot Messenger doesn't show anything whatsoever.
This is how I call my Image:
# Function 4 --------------------------------------------------------------------------------------------------
def rerun_conversation(req):
rerun_conversation_text=req.get('queryResult').get('parameters').get('rerun_again')
if rerun_conversation_text == "No" or rerun_conversation_text == "no":
return {"fulfillmentMessages": [
{
"card": {
"title": "Enjoy the film",
"imageUri": "https://lh6.googleusercontent.com/lVo4excFqlywxK4iJ-ITrB0QGZR8ZSF59bL46eXylYCjYRA-8J2YqcSosA-AVE8sdcC2tvnKpUBhlYHS9gu6=w1919-h1007"
}
}
]
}
elif rerun_conversation_text == "Yes" or rerun_conversation_text == "yes":
return {"followupEventInput": {"name": "KellyMovieBot","languageCode": "en-US"}}
The output in Dialogflow:
But in Facebook Messenger doesn't return anything
I made an update - 29.07.2020 - 22:10
return {"fulfillmentMessages": [
{
"platform": "FACEBOOK",
"card": {
"title": "Title: this is a title",
"subtitle": "This is an subtitle. Text can include unicode characters including emoji .",
"imageUri": "https://lh6.googleusercontent.com/lVo4excFqlywxK4iJ-ITrB0QGZR8ZSF59bL46eXylYCjYRA-8J2YqcSosA-AVE8sdcC2tvnKpUBhlYHS9gu6=w1919-h1007",
"buttons": [
{
"text": "This is a button",
"postback": "https://assistant.google.com/"
}
]
}
}
]
}
This seems to work for Facebook Messenger response but again the image is shown in Dialogflow and not in Facebook Messenger. Code taken from this SO question.
In Messenger still, the problem exists
However, when I put a different image is shown successfully...Does it matter that gif image is from Drive? But Dialogflow doesn't have any problem with that only Messenger has.
Different static image
Update 30.07.2020-Based on comments
Changing this image uri "https://lh6.googleusercontent.com/lVo4excFqlywxK4iJ-ITrB0QGZR8ZSF59bL46eXylYCjYRA-8J2YqcSosA-AVE8sdcC2tvnKpUBhlYHS9gu6=w1919-h1007"
to
https://drive.google.com/file/d/1onUvzmNd4cvg4maSA6EpW5uu3py8jYZE/view?usp=sharing
Resulted into this (so I guess that just sharing an image from drive is not sufficient):