in loginconnect_directintegrator/services/graph-api.js [51:72]
static callMessengerProfileAPI(requestBody) {
// Send the HTTP request to the Messenger Profile API
console.log(`Setting Messenger Profile for app ${config.appId}`);
request(
{
uri: `${config.mPlatfom}/me/messenger_profile`,
qs: {
access_token: config.pageAccesToken
},
method: "POST",
json: requestBody
},
(error, _res, body) => {
if (!error) {
console.log("Request sent:", body);
} else {
console.error("Unable to send message:", error);
}
}
);
}