Hy everybody,
I just started to read about the facebook api.
Did anybody already get a purebasic program to post on facebook?
I would like to post new highscores of our users to facebook if they like that.
So I need the program to read in username/password and after that do that oauth stuff.
Just would like to know if somebody already did this successfully and maybe give me some hints.
Cheers,
Markus
Facebook connection?
Re: Facebook connection?
It's pretty straight forward actually. There is a whole documentation
about all the API stuff on Facebook itself, just check it out.
I tried it a couple of years ago and it was rather easy,
but I don't think I ever saw any examples around here.
about all the API stuff on Facebook itself, just check it out.

I tried it a couple of years ago and it was rather easy,
but I don't think I ever saw any examples around here.
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
Re: Facebook connection?
As I see it I have to do something like that:
No clue yet how I embed a browser in purebasic.
Code: Select all
Desktop Apps
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):
https://www.facebook.com/dialog/oauth?
client_id=YOUR_APP_ID&
redirect_uri=https://www.facebook.com/connect/login_success.html
After the user authorizes your app, we redirect the user back to the redirect_uri with the access token in the URI fragment:
https://www.facebook.com/connect/login_success.html#access_token=...
Detect this redirect and then read the access token out of the URI using whatever mechanisms provided by your framework of choice.
Re: Facebook connection?
WebGadget() ?Brujah wrote:No clue yet how I embed a browser in purebasic.
Re: Facebook connection?
Yes. this should do the job.
I have a problem that my kubuntu shows only an empty window when I start the testprogram.
Probably a gtk lib is missing here.
No clue though which one this could be
I have a problem that my kubuntu shows only an empty window when I start the testprogram.
Probably a gtk lib is missing here.
No clue though which one this could be
