Unable to fetch videos of facebook page using graph API

Unable to fetch videos of facebook page using graph API

  

I have a Facebook page where i have 3 posts and those posts contains videos in it but when i try to access videos using graph api, No videos are getting returned.

here is the API I'm trying

API - https://graph-video.facebook.com/{ page_id }/videos?access_token={ access_token }

here are the permissions given to this access_token

email
pages_show_list
pages_read_engagement
public_profile

Then i tried following approach whether videos are available or not just for R&D purpose and i am getting the videos detail

  • Get all posts via access token
  • From the posts response get page access token
  • use the page access token use attachment api
  • Here i am getting the video details

So, the query is why /videos api not giving me any result. Can anyone please help me out on this ?

Thanks.

Answer

This is how I'd request to get videos from facebook page, send out a GET request to /{page-id}/videos using curl like below.

curl -i -X GET "https://graph.facebook.com/{page-id}/videos?access_token={access-token}"

© 2024 Dagalaxy. All rights reserved.