0

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();
}

enter image description here

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.

enter image description here

So the issue is its not working with my old account. Can anyone suggest how to fix this.

Thanks.

0

1 Answer 1

0

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}"

7
  • already tried this solution but its return blank array ( No result ) While my page posts containing videos in it. Commented Jun 24 at 7:05
  • 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. Commented Jun 26 at 7:27
  • @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. Commented Jun 28 at 12:34
  • 1
    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. Commented Jun 28 at 12:41
  • 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 Commented Jun 28 at 13:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.