Starting from this very nice article about doing facebook integration using the javascript API, I was able to successfully make several calls against the FB.Connect namespace.
I am now interested in calls that are in the FB.ApiClient library, and have tried a few simple ones. I cannot get this to work, is there something I have to do that different?
Specifically, I would like to make calls against the events_get methods.
Documentation:
- Facebook JavaScript API
- streamPublish (working well!)
- events_get (method I would really
like to get working)
Code:
Working JavaScript:
function updateStatus() {
FB.Connect.streamPublish();
}
Error: FB.ApiClient.get_apiKey is not a function
function getEventInfo() {
FB.ApiClient.get_apiKey();
}
the namespace and methods are inconsistent in the way that they are named and used. To access the apiClient, you must use FB.Facebook.apiClient.
In short. Instead of calling:
call:
Below, I have included a complete example, where I worked out several methods on the Connect and ApiClient APIs. This is working as of 1/22/09.