Facebook Graph API Retrieves All Field Data

From my point of view, we can get user information through something like this:

$cordovaFacebook.api( "me?fields=name,email,picture", ["public_profile", "email"]) .then(function (response) { console.log(response); }, error); 

How can we directly get all the available information without specifying one by one?

+8
facebook cordova cordova-plugins
source share
2 answers

How can we directly get all the available information without specifying one by one?

You can not.

With API v2.4, Facebook has reduced the number of fields returned by default for different endpoints to improve performance (especially with regard to mobile connections).

It was a deliberate decision - and letting it β€œget around” it, just making a lot of lazy developers ** still just asking them all; -)


You may have heard at some point that in SQL fe a SELECT * is considered bad practice - this is pretty much the same case here. You should explicitly request the data that you need now - and not just "Ill request all this and find out what I could use for future reference."


If you are not sure which fields are available for a particular endpoint, then either refer to the documentation for that endpoint, or use Introspection to list all the fields.

+14
source share

For python, the Facepy library is already completing the get function to get all the fields.

0
source share

All Articles