Get the Facebook fan pages the user owns/administrates

I'm using the Facebook JavaScript SDK to get the all the fan pages that the logged in user owns/administrates.

FB.api('/me/accounts', function(response){
    console.log(response);
});

but this shows only the Facebook apps that I own. Am I using the wrong link?

Edit

I added this to my login button :

<fb:login-button perms="email,user_birthday,manage_pages" id="auth-loginlink"></fb:login-button>

and in the Auth Dialog (in the dashboard) i added manage_pages to extended permissions. In the authentication dialog i don't see the manage_pages permission and I still not see the fan pages in the response.

Answers


The answer is :

FB.login(function(){}, {perms:'manage_pages'});

Need Your Help

Trying to compile a simple opencv c++ file

c++ opencv

I'm new to open cv. At the moment I'm trying to test if I could run a simple file.

Can't write new elements to IteratorAggregate?

php arrays iterator spl

Am I correct in thinking that IteratorAggregate only provides array-like read access to an object? If I need to write to the object-as-array, then I need to use Iterator?