Two steps to use Facebook's API
There are many types of Facebook Apps, and many kinds of API, but they all come down to this basic routine:
The FGT library is designed around this flow. The Portable Library component contains all the classes you need to make API calls to Facebook, you can run it in .NET 4.0 Client Profile, Windows 8 App, ASP.NET server, or anywhere you like, as long as you provide a valid token to your calls. The classes in Facebook.Server namespace are expected to be used on a ASP.NET server, they help you obtain an access token if you choose to get one that way.
Obtaining an access token (a.k.a. Authorization)
Most of the API calls provided by Facebook require an access token. Each token has a few properties:
From this, we can quickly derive some limitations on a token:
More about "Permissions"
To protect user's privacy, Facebook restrains the data apps are allowed to access. Without an access token, you can only query public information on Facebook. With an access token, you can query some basic information of your user, like the user's id, name etc.
There is a whole list of permissions on Facebook's documentation at https://developers.facebook.com/docs/facebook-login/permissions/ and I will not go through them all. Here are some of the most common permissions developers ask:
Remember, apps that require more permissions generally have a lower "authorization rate" - more users will turn away at the authorization dialog.
If you are uncertain about what kind of permissions you need, forget it for the time being, you can always add it back later. For now, we will setup new Facebook App and get FGT going.
Make a API call
Tokens can be used the same way no matter how you get one. You can get a token from an Andriod app, pass it to the server and then call Facebook's API at the server. Or you can call it in a desktop app. It does not make any difference.