Reputation: 711
I am using this for my node app.
I can get token with the script and I get the /me
to work. But when I am trying to get me/accounts?fields=name,id&limit=1000
I get a error.
An active access token must be used to query information about the current user.
I test my token here and I got the following result.
App ID foo : bar
User ID 10153192307109460 : Krister Johansson
User last installed this app via API v2.x
Issued 1440597064 (about a minute ago)
Expires 1445781064 (in about 2 months)
Valid True
Origin Web
Scopes manage_pages, publish_pages, publish_actions, public_profile
And if I test my token in the Graph API Explorer, I get no errors and it will list my accounts.
Upvotes: 2
Views: 1202
Reputation: 31479
Have you got
FB.setAccessToken('YOUR_ACCESS_TOKEN');
where YOUR_ACCESS_TOKEN
is your actual Access Token in your code before you make the call?
If so, check the passing of the parameters is like
FB.api('me/accounts', { fields: ['id', 'name'], limits: 1000 }, function (res) { ... });
Keep in mind that the module is more than two years old and does very likely not reflect the latest Graph API changes.
Upvotes: 2