As I see it I have to do something like that:
Our OAuth 2.0 implementation does not include explicit desktop app support. However, if your desktop app can embed a web browser (most desktop frameworks such as .NET, AIR and Cocoa support embedding browsers), you can use the client-side flow with one modification: a specific redirect_uri. Rather than requiring desktop apps to host a web server and populate the Site URL in the Developer App, we provide a specific URL you can use with desktop apps: https://www.facebook.com/connect/login_success.html.
Embed a web browser and load the OAuth Dialog (https://www.facebook.com/dialog/oauth) using the client-side flow (i.e. response_type=token):
After the user authorizes your app, we redirect the user back to the redirect_uri with the access token in the URI fragment:
Detect this redirect and then read the access token out of the URI using whatever mechanisms provided by your framework of choice.
No clue yet how I embed a browser in purebasic.