Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find out whether Facebook page is live streaming

Tags:

facebook

Is possible to find out whether some facebook page is live streaming right now? I was looking at Facebook API and from there it seems to me that it is not possible since /{page_id}/live_videos seems to be working only if you are an admin of the page (or you have been granted the access) since you cannot read live videos of public without page access token.

like image 348
Xoroxoxoxoxoso Avatar asked Aug 30 '16 22:08

Xoroxoxoxoxoso


3 Answers

I know this is quite late already but for those that may stumble on it like I did, Yes it's possible. As clearly stated in the documentation Page Live Videos - Facebook API Documentation

You will need to make a GET Request to the endpoint below with the appropriate parameters:

https://graph.facebook.com/v6.0/{page-id}/live_videos

Where page_id is the Facebook Page ID you with to check for active Live Stream

The endpoint also expect broadcast_status whose value for your use case would be LIVE

Note: You will need and app setup on Facebook for developers platform and your query would have to be via the app Further details can be found in the documentation whose link I provided at the initial part of this answer.

like image 91
Enrico Avatar answered Nov 18 '22 04:11

Enrico


Yes, you can. This is actually called a WebHook (simultaneous notification of a certain app/user about changes made on the page). To do this you will have to create a Facebook App that will be subscribed to the changes made on a certain page that you want to track.

You can simply do this from the dashboard of the app or through Graph API 2.7(since this version supports live_videos) calling {app-id}/subscriptions and choose any of Page Object Subscriptions, which are available through Facebook API(in your case live_videos).

For this kind of subscriptions your app needs to be whitelisted in order not to spam or re-transmit the information received from a certain page.

To get more information about WebHook implementation please read Facebook API documenation: https://developers.facebook.com/docs/graph-api/webhooks

like image 31
Coke Avatar answered Nov 18 '22 04:11

Coke


You might be able to get a returned string if there is any, from:

GET /v2.7/{page-id}/live_videos HTTP/1.1

Host: graph.facebook.com

You can read more in: https://developers.facebook.com/docs/graph-api/reference/page/live_videos/

like image 1
IoannisK Avatar answered Nov 18 '22 06:11

IoannisK