问题
as facebook mentioned here for get live comment
and i do like what they said
var source = new EventSource("https://streaming-graph.facebook.com/2025853151054872/live_comments?access_token=MY TOKEN HERE&fields=from{name,id},message");
source.onmessage = function(event) {
console.log(event);
// Do something with event.message for example
};
this will give me 401 error and as they mentioned here at the end of page its mean
Unauthorized
Make sure your app has the right permissions and that the access token is valid.
so i checked my access token here
and its give me this result
Metadata {"sso":"chrome_custom_tab","auth_type":"rerequest"}
Valid True
Data Access Expires 1560876206 (in about 3 months)
Origin Mobile Web Faceweb
Scopes email, publish_video, manage_pages, pages_show_list, publish_pages, public_profile
i don't know why there is error and every thing its right
also i test same url with android library library and same its give me error
回答1:
i found the solution seems facebook need more permission and its
user_videos
permission but they doesn't mentioned that
来源:https://stackoverflow.com/questions/55266807/facebook-api-get-live-comment