me?fields=friends fetches
{
"friends": {
...
"summary": {
"total_count": 72
}
},
...
}
I just want total_count, but it seems it isn't a valid sub-field I can put in the query
me?fields=friends{summary} or me?fields=friends{total_count} doesn't work.
Not an absolute necessity, just curious why not or whether it's possible?
Field expansion only works on the fields of an object.
So if the object is of type user, the fields that can be expanded are listed at https://developers.facebook.com/docs/graph-api/reference/v2.1/user
Example
me?fields=friends{name,link}
If you are trying to decrease the data returned for performance, you can try using the limit to ensure that no friends are returned (the data array is empty) while still obtaining the summary section
me?fields=friends.limit(0)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With