facebook api get live comment

给你一囗甜甜゛ 提交于 2021-01-28 05:05:24

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!