0

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." 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. Did anyone experienced this problem?

batnaidan
  • 11
  • 2

1 Answers1

0

in front of your base64 string add

"data:image/png;base64,"

to make it base64 picture. so it will look like this

"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8CwHwAExQHAgpnk/QAAAABJRU5ErkJggg=="
batnaidan
  • 11
  • 2