I am trying to create an app that would get the live comments from one of my live videos on my FB page and would play a notification sound whenever someone comments. I'm quite new to APIs and I tried reading the Graph API documentation for live comments here: https://developers.facebook.com/docs/graph-api/server-sent-events/endpoints/live-comments
Here is a sample that was given to subscribe to the endpoint and get the live comments:
var source = new EventSource("https://streaming-graph.facebook.com/{live-video-id}/live_comments?access_token={access-token}&comment_rate=one_per_two_seconds&fields=from{name,id},message");
source.onmessage = function(event) {
// Do something with event.message for example
};
My access token works fine. Checked it on the Access Token Debugger. The access token has the proper permissions based on the documentation on the live-comments endpoint link above.
I tried the code out and it seems like the API call is successful because it's returning a status code of 200, but I'm getting this particular error message
I tried searching for what to do and I can't find anything that can help me on fixing this. I am completely lost. I hope someone can help me fix this or even just point me to the right direction.