Implementation for the Data Deletion Callback in JavaScript for Node with Expressjs.
The most stupid pitfall for this callback is that the response has to look like this:
{ url: '<url>', confirmation_code: '<code>' }
This and other more reasonable variations are invalid:
{ "url": "<url>", "confirmation_code": "<code>" }
This means you cannot use JSON.stringify
or Response.json(object)
, but this glorious snippet:
res.type('json')
res.send(`{ url: '${url}', confirmation_code: '${confirmationCode}' }`)
Another pitfall is that Facebook's signature always has a =
appended (see line 43 in parseSignedRequest.mjs).
can you share also the
'../logger.mjs'
,'../util.mjs'
and'../ResponseError.mjs'
files?