Forum Sitebox Get App Access token on Facebook?

Discussion and help relating to the PlayerIO webpage and Facebook app hosting solution, Sitebox.

Get App Access token on Facebook?

Postby mindbogglegames » March 22nd, 2012, 9:53 pm

Hi!

I'm trying to make my game post scores to the Facebook timeline. I got everything working except that I can't find a way to get the app access token with Sitebox. As far as I can tell the playerio doesn't give the game the app access token as one the parameters that it sends to swf. You can get the app access token in the client by hard coding in the app secret but I would really prefer not to expose the app secret to the users. Does Player IO support this somehow with Sitebox? Or is there some other work around?
mindbogglegames
Paid Member
 
Posts: 38
Joined: December 19th, 2011, 6:51 pm

Re: Get App Access token on Facebook?

Postby Henrik » March 23rd, 2012, 2:21 pm

No, we can't expose the app access token through Sitebox, because anyone that has that can do a lot of things in the name of the app, and I don't think you want other people to be able to spam your app's users. :-)

We see the need for being able to get the app access token in serverside code, so we'll investigate that and see if we can find a solution for it.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Get App Access token on Facebook?

Postby mindbogglegames » March 23rd, 2012, 3:25 pm

Thanx for the input!

So it would be a safety risk to handle the app access token in the client at all? I guess I should hard code in the app access token(hopefully it doesn't expire) in the player.IO dll game code and then call the graph api from server side for now?
mindbogglegames
Paid Member
 
Posts: 38
Joined: December 19th, 2011, 6:51 pm

Re: Get App Access token on Facebook?

Postby mindbogglegames » March 23rd, 2012, 6:54 pm

I implemented so that the player.IO server sends the score to facebook with the PlayerIO.Web.Post. Sadly I realized that Player.IO doesn't accept that you post to https adresses and Facebook requires you to send it to their https adress. So currently it doesn't seem possible to do this even if you hard code the app access token on the server :(. The only ways of doing it currently seems to call some other web server(lots of extra work) that does it for you or do it client side(security risk)

Anyone got any bright ideas how to solve this easier or more secure?
mindbogglegames
Paid Member
 
Posts: 38
Joined: December 19th, 2011, 6:51 pm

Re: Get App Access token on Facebook?

Postby Benjaminsen » May 1st, 2012, 1:06 pm

mindbogglegames wrote:I implemented so that the player.IO server sends the score to facebook with the PlayerIO.Web.Post. Sadly I realized that Player.IO doesn't accept that you post to https adresses and Facebook requires you to send it to their https adress. So currently it doesn't seem possible to do this even if you hard code the app access token on the server :(. The only ways of doing it currently seems to call some other web server(lots of extra work) that does it for you or do it client side(security risk)

Anyone got any bright ideas how to solve this easier or more secure?


HTTPS requests should work now :)
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Get App Access token on Facebook?

Postby mindbogglegames » May 1st, 2012, 6:07 pm

Awesome, thanx!
mindbogglegames
Paid Member
 
Posts: 38
Joined: December 19th, 2011, 6:51 pm

Re: Get App Access token on Facebook?

Postby wbsaputra » November 20th, 2012, 1:18 am

Hi there, discussing about accesstoken, is there any method on sitebox or facebook playeri api to renew access token when expired?
wbsaputra
Paid Member
 
Posts: 150
Joined: June 29th, 2010, 4:38 pm


Return to Sitebox



cron