I am trying to access the live views count of a live video that is live through a Facebook Page. I am using the ID that I am obtaining from the API request {page-id}/videos/uploaded
When I am using that video id and making a GET request of {video-id}?fields='live_views
its showing error code of 100 with the message as:
(#100) Tried accessing nonexisting field (live_views) on node type (Video)
I have the following permissions:
'manage_pages', 'publish_pages', 'business_management', 'read_insights', 'user_videos'
I am making the GET request using user_access_token. I am using Graph API Version 2.8.
Please let me know if I am using the wrong ID. IF yes, then how can i get the live_video_id
of a live video posted in page?
In the Select a video source section, click on Streaming Software. Facebook will display a Stream Key. Expand the Advanced Settings section to reveal the Server URL. The Stream Key and Server URL will be used in the Live module.
The Live Video API enables video encoders, cameras, web, and desktop applications to stream live video directly to Facebook user profiles, pages, and groups. As long as your app can produce a live RTMPS stream, you can stream to Facebook using the Live Video API.
To get the live views count of a video a fan page, you need:
With this you can call graph API in the following format:
https://graph.facebook.com/v2.8/<fan_page_id>/live_videos?access_token=<access_token>?fields=live_views
Of course, you may add more elements in fields parameter if you need more information. Here Facebook's Graph API explorer helps: https://developers.facebook.com/tools/explorer
When you add status
to fields
parameter, "LIVE" means, it's currently live, "VOD" means it has already finished.
If you try to implement a WebHook for it, let me now if it works. Thanks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With