Unable to fetch videos of facebook page using graph API
I have and Facebook developer account created around 4 years before. The problem is when i try to fetch page videos, its not returning any result.
Note: i am using laravel-socialite package and the app is not verified yet.
When tried to debug i found out that the auth toke does not contain "pages_read_user_content" this permission.
On my laravel code i have added this permission but still when i am doing authentication its not showing this permission.
public function login(){ return Socialite::driver('facebook') ->stateless() ->setScopes(['pages_read_engagement', 'pages_show_list', 'pages_read_user_content']) ->usingGraphVersion('v20.0') ->redirect(); }
Approach i tried :
To test this i created a new facebook developers account and did all the process and boom it worked. I am attaching the screenshot of permission detail with new developer account.
So the issue is its not working with my old account. Can anyone suggest how to fix this.
Thanks.
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}"
already tried this solution but its return blank array ( No result ) While my page posts containing videos in it.
Could you please check you have set correct access token permissions like it must have the necessary permissions, specifically pages_read_engagement and pages_read_user_content. Also please make sure the token is not expired and has the appropriate scope.
@NarendraSishodiya thanks. I have given following permissions to my page access token - email - pages_show_list - pages_read_engagement - public_profile Also tried by allowing all the permission from Graph Api manage access section. But still the same. can you suggest from where i can allow these two permissions ? pages_read_engagement and pages_read_user_content. Added permission screenshot on main question for reference.
Could you please navigate to the "App Review" section in the left-hand menu and then click on "Permissions and Features". After this search for pages_read_engagement and pages_read_user_content.
My app is not verified yet. I am doing this on a test environment. To allow these permission does app needs to be verified ? attaching the screenshot of app review section also on main question