Facebook API Upload Custom Conversions
Im following Facebook's Graph API, trying to upload a Custom Conversion without success (https://developers.facebook.com/docs/marketing-api/audiences/guides/custom-audiences#upload). I managed to create the audience, nomalize and hash my data accordingly (I know this to be true as I us it on other requests) but can´t update my audience.
const upload = {
"payload": {
"schema": [
"FN",
"LN",
"EMAIL",
],
"data": users.transactions.map(transaction => ([
normalizeData(transaction.customer.firstName),
normalizeData(transaction.customer.lastName),
normalizeData(transaction.customer.email),
]))
},
"access_token": access_token, 'www-authenticate': `OAuth "Facebook Platform" "invalid_request" "Unsupported post request. Object with ID 'xxxxxx' does not exist,
};
async function uploadUsersCA(audienceID, payload) {
try {
return await axios.post(`https://graph.facebook.com/${api_version}/${audienceID}/users`, payload);
} catch (error) {
console.error(error);
}
}
Please help! I keep geting
status: 400,
statusText: 'Bad Request', 'www-authenticate': `OAuth "Facebook Platform" "invalid_request" "Unsupported post request. Object with ID 'xxxxxxxx' does not exist,
And I know as a fact it exists and have permisions as I can GET, DELETE it and more! I think the mistake could be on const upload, but cant find it, Please help!
from Recent Questions - Stack Overflow https://ift.tt/39u5MVy
https://ift.tt/eA8V8J
Comments
Post a Comment