2017-01-25 7 views
0

こんにちはFBメッセンジャーでgifを送信しようとしています。私のコードは、私が何をやっているようGIFがFacebookのメッセンジャーで送信しないBot

 function sendGif(sender) { 
      let messageData = { 
       "attachment": { 
        "type": "image", 
        "payload": { 
         "url": "http://giphy.com/gifs/tom-cruise-risky-business-movie-3jzoNumaV4o80", 
        } 
       } 
      } 
      request({ 
       url: 'https://graph.facebook.com/v2.6/me/messages', 
       qs: {access_token:token}, 
       method: 'POST', 
       json: { 
        recipient: {id:sender}, 
        message: messageData, 
       } 
      }, function(error, response, body) { 
       if (error) { 
        console.log('Error sending messages: ', error) 
       } else if (response.body.error) { 
        console.log('Error: ', response.body.error) 
       } 
      }) 
     } 

を下回っているが、イムは、私が添付しようとしているファイルは、現在許可されていることを私に言ってされているこのエラーを取得し、異なるフォーマットを持っている

2017-01-25T13:27:53.586498+00:00 app[web.1]: Error: { message: '(#546) The type of file you\'re trying to attach isn\'t allowed. Please try again with a different format.', 
2017-01-25T13:27:53.586508+00:00 app[web.1]: type: 'OAuthException', 
2017-01-25T13:27:53.586509+00:00 app[web.1]: code: 546, 
2017-01-25T13:27:53.586510+00:00 app[web.1]: error_subcode: 1545026, 
2017-01-25T13:27:53.586511+00:00 app[web.1]: fbtrace_id: 'BN+U/mDnnMi' } 

違う?

+0

変更あなたのペイロードURL: 'https://でmedia.giphy.com /メディア/ 3jzoNumaV4o80/giphy.gif' –

答えて

関連する問題