Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / http commands and likes, +1, etc...

Author
Message
blueFire
13
Years of Service
User Offline
Joined: 23rd Jan 2011
Location: North Carolina
Posted: 7th Feb 2012 01:19
I am hoping it will be possible with the new http commands coming in build 1067 to allow people to "like" the program on FaceBook or give it a "+1" on Google, etc...

It would be even better if they could do it from inside the program without leaving the program.

Jason
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 7th Feb 2012 13:47
You can do anything you can do with an HTML command.

So www.website.com/?like=yes is more than possible. Then you can create a php script on your website to handle the actual facebook/google api call.

My signature is NOT a moderator plaything! Stop changing it!
bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 7th Feb 2012 14:47 Edited at: 7th Feb 2012 15:09
That wouldn't really work because facebook requires a login (cookie), so a like coming from your server won't fix that.

We'd need a special command just for fb in AppGameKit for a like button to be possible.

That said, if you implemented your own review system that ties in with your own website, that would be easily possible with the http commands.

Now if we could have html frames as sprites inside an agk game, that might make fb buttons possible. But with just being able to send/receive html calls, probably not, unless the service provides url-only calls.

Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 7th Feb 2012 20:36
I'm sure you can still log into facebook from within an AppGameKit app. You can send the login credentials to them and parse the reply for confirmation? I don't know without checking but I'm sure there's a way.

My signature is NOT a moderator plaything! Stop changing it!
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 8th Feb 2012 00:17
From what I know, the Windows HTTP commands will automatically send cookies back to the host that set them. So if you POSTed some details to the facebook login script you may not have to read the response as the cookie is set automatically, then just rely on the cookie that gets sent with your request to the "like" script to authenticate the user. The user would have to give your app their facebook login details though, which they may or may not want to do.

Can't be sure how the other platforms will behave with cookies, something to test.
Greenster
19
Years of Service
User Offline
Joined: 3rd Feb 2005
Location: US ©
Posted: 8th Feb 2012 06:38
The cookie comes back in the "Cookie:" header in HTTP packets. Facebook does in fact require authentication for this, and returns JSON. ASK isn't currently capable of this or any other HTTP operations, except in tier2 where you can write your own.

You need an API key, and some custom HTTP headers set. A single function that does GET and POST and allows custom headers would fix this, but I don't see TGC doing this for marketing reasons..
3d point in space
15
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 13th May 2012 06:02
passing username and password to facebook is quite easy I tried it in my code on snake snacker.



Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps.
Developed the tiled map engine seen on the showcase.
Veterian for the military.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 14th May 2012 17:27
Quote: "passing username and password to facebook is quite easy I tried it in my code on snake snacker."


Unfortunately that is for HTTP authentication which facebook doesn't use.

You can however use the link at the very bottom of this page http://developers.facebook.com/docs/share/ notably "http://www.facebook.com/sharer.php?u=<url to share>&t=<title of content>" with the OpenBrowser command to share a link to their wall. Facebook will ask the user to login with their browser then ask them to confirm the link to share. There may be a similar link to like a page, but I don't know of one.

Login to post a reply

Server time is: 2024-11-23 12:27:02
Your offset time is: 2024-11-23 12:27:02