bots


AnimationCard works on emulator but not on Messenger


I am trying to display an Animation Card using the Bot Framework with a text, GIF and buttons. It works perfectly on the bot emulator but does not show up on Messenger. Any ideas?
Code
/**Send the question with the level information if available, the index and the Math expression along with a countdown timer as GIF attachment */
let message = new builder.Message(session)
.text(level ? level + ' \n' + strings.question : strings.question, dialogData.index + 1, question.expression)
.addAttachment(
new builder.AnimationCard(session)
.media([{
profile: "image/gif",
url: "https://media.giphy.com/media/l3q2silev6exF53pu/200w.gif"
}])
.buttons(buttons)
// .toAttachment()
)
session.send(message)
On Emulator
On Messenger
Any ideas what might be off? Thank you in advance for your suggestions
UPDATE 1
This s the error on my console
{"error":{"message":"(#100) Param [elements][0][title] must be a non-empty UTF-8 encoded string","type":"OAuthException","code":100,"fbtrace_id":"CLEcx63w+4N"}}
You need to include a title with your animation card, Messenger requires all cards to include a title. Also, animation cards work a little differently in messenger in that they send a message with the .gif followed by a card with the title and the buttons, rather than having them all together in a nice card like in the emulator.
In your use case, I would use first line saying what level it is as the title, and the question as the subtitle. This text will appear below the gif instead of above it, though, so it's a little different layout than what you have now.
let message = new builder.Message(session)
.addAttachment(
new builder.AnimationCard(session)
.title(level ? level : 'Level 0')
.subtitle(strings.question)
.media([{
profile: "image/gif",
url: "https://media.giphy.com/media/l3q2silev6exF53pu/200w.gif"
}])
.buttons(buttons)
)
session.send(message)

Related Links

How to add MS bot to slack?
How to get the last executed command in a Telegram bot?
How can i customize answer of Bot Framework Help Command?
How can I identify the particular attachments when I click on a button in cards?
Accessing facebook user id for microsoft bot framework
Wit.ai Dynamic quick replies and random responses? How
I'm trying to implement a quote system in mIRC for my Twitch bot, reading from the text file works, but adding doesn't
How to set Slack bot presence “online” when using Events API
how to save the data using state clinet in bots
Connecting LUIS dialog to form dialog and mapping builtin fields
ValidationResult throws : “Object reference not set to an instance of an object”. when passing back choices
How to disconnect LUIS of Microsoft Bot Connector selectively?
Skype bot in “In Review” Status
Bot framework documentation qna maker [closed]
How to make telegram bot to remove links?
Testing in Bot Framework returns 401 Unauthorized

Categories

HOME
svn
adfs3.0
antd
hid
visualforce
ag-grid
ui-automation
joomla3.2
kurento
bellman-ford
xamarin-zebble
slide
phpstorm-2017.1
cname
xbap
mahout-recommender
fresco
robolectric
multiple-tables
parceler
spring-ldap
data-type-conversion
el
opentext
data-collection
high-availability
prompt
nic
xenapp
source-insight
series
sql-execution-plan
bootstrap-sass
dreamfactory
pdfnet
spring-restcontroller
export-to-pdf
grails3.2.0
access-denied
reverse-dns
docker-ucp
cyanogenmod
supertest
mura
sidewaffle
scheduledexecutorservice
metabase
system.net.mail
traversable
ajaxmin
gnucash
node-glob
utf-16
mnesia
onepage-checkout
myfaces
boost-proto
openshift-cartridge
wso2ml
fantom
artisan
android-audiomanager
debug-symbols
lifetime
full-text-indexing
forceclose
rails-api
spring-social-linkedin
rautomation
coalesce
spiral
nsmutablestring
trialware
opends
navigationcontroller
office-automation
page-curl
downgrade
getimagesize
sqlsitemapprovider
remote-working

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App