This is a general question on how to read Facebook’s Javascript API documentation. How can I get a complete description on the objects that are passed into my callback functions? Take for example FB.Login‘s sparse documentation:
Name | Type | Description
-------------------------------------------
cb | Function | The callback function.
It does not state what is passed into this callback. I’ve been using Firebug to inspect the object that is passed back and making guesses on what each property means. My reverse engineering, along with reading of sample code, is not an efficient way to program. I would like to know where I can find the complete Facebook documentation.
For the
FB.Login()call you asked about, there is this code example:That shows that the callback takes one argument and it’s the login response. The login response appears to be discussed here in the doc for
FB.getLoginStatus().I would agree that the FB doc doesn’t make it clear where to find things like the response object format.
In answer to your general question, it appears you look for a piece of sample code to see how the callback function is declared and then poke around in related methods until you find the doc for the arguments themselves.