123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|572|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Mini Challenges -> Facebook API -to- Blitz

Mon, 17 Aug 2009, 07:57
Jayenkai
Thought about this on the way home from getting my haircut, since the barber was yammering on about playing Poker on Facebook..

Wonder how hard it would be to tie your Blitz highscores into the Facebook API system?!

(tweaked topic title.. damn my super-padded-security!)

-=-=-
''Load, Next List!''
Mon, 17 Aug 2009, 08:21
Scherererer
Facebook has several API's that you can work with, which can all be found here. It looks like there's some kind of FB Developer application you have to install first to get started, but they've got different tools for debugging and testing which is neat. I know you can develop for it in all matter of languages (.NET, Java, PHP to name a few)

-=-=-
YouTube Twitter
Computer Science Series: Logic (pt1) (part 2) (part 3) 2's Complement Mathematics: Basic Differential Calculus
Mon, 17 Aug 2009, 09:56
Afr0
The easiest way would probably involve just sending (obscure) HTTP calls to the Facebook servers.
Note that it's probably more or less impossible to achieve in Blitz 3D, but it might be possible in BlitzMax.
Facebook doesn't (seem) to use SSL for login, which means it most likely either employs some manner of already existing encryption protocol like SRP (Secure Remote Password) or a proprietary one.
Woe be onto you if it's SRP.

Edit: Just checked, and the little lock symbol doesn't appear in IE8, which means it's probably not using SSL.

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!
Mon, 17 Aug 2009, 12:36
Mog
Jay, Use cURL- it's very possible since Facebook doesn't use SSL. Here's an example on how to log in using PHP, but i think there's a curl lib for b3d/max:



After all this, you'll have to poke around in their site for where they post to the API, which uses a unique key that gets assigned to your app. I may play around with this and give you my results, i like messing with facebook...

PS: you would then use cURL to post your results to your API url using your account credentials

PPS: Yes, i'm spoofing a browser in that code, shoot me.

-=-=-
I am Busy Mongoose - My Website

Dev PC: AMD 8150-FX, 16gb Ram, GeForce GTX 680 2gb

Current Project: Pyroxene
Mon, 17 Aug 2009, 15:03
JL235
I can imagine this would possible, but difficult to do from BB. So instead you could write the connection upload system as an external program of VBScript file. When you want to upload high-scores you just run the exe/script from BB passing in the arguments.

Or build it as a .dll.
Tue, 18 Aug 2009, 11:47
Stealth
Or just have your Blitz script interface with a PHP script you have online.

Blitz Code => PHP Script => Facebook API

This would be a better solution anyways since the Facebook API may change at any time and centralizing the PHP script would be a much more efficient method of updating.

-=-=-
Quit posting and try Google.
Tue, 18 Aug 2009, 14:52
Jayenkai
Sounds a good idea, although having to pass data from one server to another might slow it down a wee bit. But it's a decent enough idea.

I think I'll have a play around with Facebook, and see what I can come up with, although I doubt it'll be as multiple-games, multiple-tables friendly as I'm hoping for!

-=-=-
''Load, Next List!''