0

Facebook messenger webhook recieves attached image only with url which is getting expired in some time. How to obtain more information from facebook api to generate new url?

1 Answers1

0

There is not an api to get information about message attachments currently.

I am not sure if/when the image will be deleted, as there is no mention of this in the docs. If you want to guarantee permanent access to the image, you should store it somewhere like s3.

An example of this using knox:

http.get('http://google.com/doodle.png', function(res){
  var headers = {
      'Content-Length': res.headers['content-length']
    , 'Content-Type': res.headers['content-type']
  };
  client.putStream(res, '/doodle.png', headers, function(err, res){
    // Logic
  });
});
Jon Church
  • 2,320
  • 13
  • 23