[英]Is there any other way to insert image in FBInstant.updateAsync
I'm experiencing a trouble with this code我在使用此代码时遇到问题
FBInstant.updateAsync({
action: 'CUSTOM',
template: 'play_turn',
cta: 'Join',
text: `Test user just played. Come join in game!`,
image: imagebase64encoded,
})
When I run this code I get an error in console "GraphQL server responded with error 1675030: Error performing query."当我运行此代码时,我在控制台中收到错误消息“GraphQL 服务器响应错误 1675030:执行查询时出错。” When i Try to run this without image I get error in console "Custom update requires image or media input" My imagebase64encoded has no error.
当我尝试在没有图像的情况下运行它时,我在控制台中收到错误“自定义更新需要图像或媒体输入”我的 imagebase64encoded 没有错误。 Did anyone experienced this problem?
有没有人遇到过这个问题?
in front of your base64 string add在您的 base64 字符串前面添加
"data:image/png;base64,"
to make it base64 picture.使其成为base64图片。 so it will look like this
所以它看起来像这样
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8CwHwAExQHAgpnk/QAAAABJRU5ErkJggg=="
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.