Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Zahra.B2024's avatar
Zahra.B2024
Honored Guest
1 year ago

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));

No RepliesBe the first to reply