2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Meta graph Api アカウント情報取得Api (/me/accounts)が空の配列を返す問題

Posted at

結論

権限を追加するべきだった。
business_management権限を追加してください!!

原因

ログインURLを生成するときに渡す権限に問題がありました。

以下の権限でアカウント情報を取得しようとしたら失敗した。

$permissions = [
    'public_profile',
    'instagram_basic',
    'pages_show_list',
];

$login_url = $helper->getLoginUrl(config('services.facebook.redirect_uri'), $permissions);

下記のように変えて解決

$permissions = [
    'public_profile',
    'instagram_basic',
    'pages_show_list',
    'business_management',
];
2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?