How to get business page with facebook graph api and laravel socialite package?

83 views Asked by At

I use laravel socialite package to use facebook graph api and i want to get business page or business account information that associed on an simple facebook account

I use this endpoint "https://graph.facebook.com/user_id/accounts" to get all info about an user with page and it works perfectly but i want to get all business page or my business account information from this user_id.

I have tried to use this (empty data response):

$response = $fb->get(
    '/{user-id}/business_users',
    '{access-token}'
  );

or this (getting (#100) Missing Permission error) :

$response = $fb->get(
    '/{user-id}/businesses',
    '{access-token}'
  );

Thanks for your helps

1

There are 1 answers

0
Nir ina On

I found the solution, need to add a 'business_management' scopes.