Forum QuickConnect Getting fbname with quickconnect

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

Getting fbname with quickconnect

Postby samsonadze » January 11th, 2013, 8:18 pm

Is there any way to get fbname with playerio or i must send it with Flashvars?:)
C#
samsonadze
 
Posts: 122
Joined: August 29th, 2012, 2:39 pm

Re: Getting fbname with quickconnect

Postby Code.Slayer » January 11th, 2013, 9:45 pm

Hi, use this:
https://github.com/playerio/Facebook-Graph-As3
FB.api('/me', function(response:*) : void {
trace(FB.toString(response));
// parse name
})
replace "me" by facebook userid
Or
call:
http://graph.facebook.com/facebook_user_id
& parse the json result
Hope this helps
Code.Slayer
 
Posts: 4
Joined: December 21st, 2011, 8:25 pm

Re: Getting fbname with quickconnect

Postby samsonadze » January 12th, 2013, 3:00 pm

sup! Thank ya for help! :)
C#
samsonadze
 
Posts: 122
Joined: August 29th, 2012, 2:39 pm

Re: Getting fbname with quickconnect

Postby DamnSielanka » April 12th, 2013, 7:45 pm

I've got this error message:
Error: Syntax Error
at MethodInfo-528()
at MethodInfo-535()
at MethodInfo-536()
at JSON$/deserialize()
at MethodInfo-274()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()


with this code:
Code: Select all
   PlayerIO.quickConnect.facebookOAuthConnectPopup(
      stage,
      gameid,
      "_blank", // name of window to open dialog in
      ["publish_stream", "offline_access"], // requested permissions from facebook
      "",
      function(client:Client, access_token:String, facebookUserId:String ):void {
             FB.init( { access_token:'0da4b...', debug:true, app_id:'11...'} );
             FB.api('/'+facebookUserId, function(response:*) : void {
              //trace(FB.toString(response));
         })      
         //handleConnect(client);
      }, function(e:PlayerIOError):void{
         trace("Error: ", e)
      }
   )


What am I doing wrong? And another question is how to parse a name? Should I get it from this string (FB.toString()), or can make an Object?
DamnSielanka
 
Posts: 1
Joined: February 28th, 2013, 12:28 am


Return to QuickConnect



cron