How do I get the number of users of a facebook application, and my facebook fan page, programatically?
Sites like appdata dot com, provide detailed stats on usage of thousands of facebook applications. How do they collect such data?
From what I understand, FB provides app developers with stats for their apps (same with fan page admins). But how do I get these data programatically, is there any API for these?
Facebook does provide all of this through the graph api, which is at graph.facebook.com. To get all the extended data, you will need an access token.
Details, at least for applications (an can probably be expanded to pages, since the graph api works for all "objects" on FB) is found at http://developers.facebook.com/docs/api#analytics