Skip to main content
New Participant
May 2, 2024

Error with API Call in Meta platforms Need Assistance

I'm encountering an issue with an API call in my application that integrates with Meta platforms. Below is the code snippet causing the error: 

Code Causing Error: ðŸ‘‡

fetch('https://graph.facebook.com/v12.0/{user-id}/feed', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer {access 
token}'
},
body: JSON.stringify({
message: 'Hello, world!'
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));