Search code examples
phpfacebook-graph-apiinstagram-graph-api

Facebook Instagram Graph API: Listing user's pages (#100) The parameter name is required


I'm currently following this document to use Instagram Graph API: https://developers.facebook.com/docs/instagram-api/getting-started

I succesfuly made the first 3 steps but stuck in fourth step. I can't get a list of user's pages. When i use this endpoint with access_token i took from step 3 it returns an error.

https://graph.facebook.com/v14.0/me/accounts?access_token={$access_token}

It's an OAuthException and the error message is

(#100) The parameter name is required

What should i send for 'name' parameter? I can't find anything related to 'name' in https://developers.facebook.com/docs/graph-api/reference/user/accounts/

I don't use the PHP SDK. Also in case you need it here is my requested perms:

'instagram_basic',
'instagram_content_publish', 
'instagram_manage_insights', 
'instagram_manage_comments',
'pages_show_list', 
'business_management', 
'pages_read_engagement'

Solution

  • For more context to anyone finding this later. This user was likely using POST instead of GET. POST for this endpoint tries to create a page. If you are trying to use POST to make the request async, that does not appear to be supported by FB at this time.