Forum QuickConnect How to get accessToken?

Discussion and help relating to PlayerIO's QuickConnect feature, including Facebook Connect and Kongregate Connect.

How to get accessToken?

Postby prsolucoes » September 17th, 2010, 6:10 am

Hi,

Im trying connect to facebook with quickconnect, but i receive a message that the method is deprecated, so im trying using oauth, but it require some new information, like : accessToken

How i get this informations to use: facebookOAuthConnect

And how i connect to facebook without the browser open a new page to login?

Can someone post a sample on how to use : facebookOAuthConnect and facebookOAuthConnectPopup ?
prsolucoes
 
Posts: 47
Joined: March 18th, 2010, 3:20 pm

Re: How to get accessToken?

Postby prsolucoes » September 17th, 2010, 6:50 am

Now im connecting correctly, but how i can get facebook user data?
prsolucoes
 
Posts: 47
Joined: March 18th, 2010, 3:20 pm

Re: How to get accessToken?

Postby Oliver » September 20th, 2010, 10:30 am

Hey,

The facebook platform is pretty big and complicated. You'll have to dig into their documentation site to see how it works: http://developers.facebook.com/

Best,
Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: How to get accessToken?

Postby Benjaminsen » September 20th, 2010, 10:45 am

There is also a Facebook Graph API in AS3, written specifically to be compatible with the Player.IO API here:
http://github.com/playerio/Facebook-Graph-As3
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: How to get accessToken?

Postby wbsaputra » October 1st, 2010, 2:37 am

honestly i'm still looking how to get facebook access token via flashvars, any tutorial and link?
wbsaputra
Paid Member
 
Posts: 150
Joined: June 29th, 2010, 4:38 pm

Re: How to get accessToken?

Postby Oliver » October 1st, 2010, 1:26 pm

If you use the facebookOAuthConnectPopup() method, you'll get the access_token back in the callback function.

best,
Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: How to get accessToken?

Postby wbsaputra » October 12th, 2010, 10:52 pm

thanks, but can facebookOAuthConnectPopup() be used in iframe application?
i want request permission in same window, i try change the window param but seems not functioning.
wbsaputra
Paid Member
 
Posts: 150
Joined: June 29th, 2010, 4:38 pm

Re: How to get accessToken?

Postby Benjaminsen » October 13th, 2010, 7:47 am

The very easiest way to create a Facebook Application with Player.IO is using sitebox. There is a video introduction of how to configure the Seedlings example here: http://playerio.com/showcase/seedlings-sitebox-example/

If you however want to use your own servers to host the canvas page (be it FBML or IFrame) you need to parse the token from the page yourself to the flash file. This is easiest done with flashvars. Even if you are using an old Facebook API on your server it should be possible to generate an oauth token from that. (Figuring out how is left as an exercise for the reader)
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: How to get accessToken?

Postby wbsaputra » November 8th, 2010, 9:50 pm

hi, i did get fb session with fbml and passed to swf, but i dont know which one of this data can be used as access token to connect via oauth.connect
fb_fbjs_connection: _id_4cd86127126d84030646178
fb_sig_user: 1212492398
fb_sig_locale: en_US
fb_sig_cookie_sig: c0a086c27129b3f49725c93696155e23
fb_sig_profile_update_time: 1275216032
fb_sig_api_key: 3758ac43d9f3fe66f120cd34b6a29f93
fb_sig_in_new_facebook: 1
fb_sig_time: 1289249063.0758
fb_sig_ss: 6xRhHmznLvOI2UXAhBsQcw__
fb_sig_session_key: 2.DXXOhLlCwB1Ro58jindQ6g__.3600.1289253600-1212492398
width: 700
fb_sig_added: 1
fb_sig: cd7cebf645010b289aa76353ebbb1cb4
fb_sig_app_id: 324111600533
fb_sig_expires: 1289253600
fb_local_connection: _id4cd86127126ed9450128939
fb_sig_country: id
height: 400
wbsaputra
Paid Member
 
Posts: 150
Joined: June 29th, 2010, 4:38 pm

Re: How to get accessToken?

Postby Oliver » November 9th, 2010, 2:02 pm

Hey,

What you got there is an old-style "fb_sig" session key. That is not an access_token.

Facebook provides a service to exchange those old session keys into the new access_tokens.

You'll have to exchange your session key into an access_token using this service, in order to use the QuickConnect facebookOAuthConnect() methods... Notice however that you can authenticate with the old session key using the older facebookConnect() method.

My advice would be to exchange the session key to an access token using the facebook service. Read more here: http://developers.facebook.com/docs/authentication/

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am


Return to QuickConnect