GRiMe2D / facebook-actionscript-api

Automatically exported from code.google.com/p/facebook-actionscript-api
0 stars 0 forks source link

FacebookDesktop.login issue. #374

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.FacebookDesktop.init
2.FacebookDesktop.login
3.In the callback of login, the session have no sessionKey.

I have an flex application in 2 versions, web and desktop(air). The application 
connects to facebook xmpp chat. For chat i use XIFF.

On app for web i use GraphAPI for web version 1.6.1 and i get a complete 
session on login. Here things are working great.

On the app on air i use the latest version of GraphAPI_Desktop(1.8.1) on FB4 
and sdk 4.5.1. I do the init an then the login. On the callback from the login 
the result is with some parametrs only. In the past the result was the same 
with some parameters only, without sessionKey. I need that sessionKey to handle 
the connection to xmpp facebook chat with  X-FACEBOOK-PLATFORM. Til now the 
accessToken in the result from login was something like 
"xxxxx|xxxxxxxxxxxxxx|xxxxxx" and one of the pieces was sessionKey. Now the 
accessToken in something like "xxxxxxxxxxxxxxxxxxxxxxx" and i can not know 
where in that string is the sessionKey.

My code looks like:

                        FacebookDesktop.init(fbAppId, handleInit);

                        private function handleInit(result:Object, fail:Object):void
            {
                trace("Application Init")
                loginDialog.facebookLoginBox.visible = true;
            }

                        private var scope:Array = new Array("user_about_me", "user_birthday", "user_location", "read_stream", "publish_stream", "email");

            public function onFBImageClick():void
            {
                setupFacebookManager();
                FacebookDesktop.login(handleLogin, scope);
            }

In handleLogin i recive an result on type FacebookSession. This session 
contains only the accessToken, expireDate, uid and user(object populated 
properly).
The xmpp_login is not in the scope because later in handleLogin i call extended 
permissions with xmpp_login.

Til some time ago things worked ok in this configuration.

What am i doing wrong? Am I missing something?

Excuse my bad english.

Original issue reported on code.google.com by ad...@radiolynx.ro on 3 Nov 2011 at 10:52

GoogleCodeExporter commented 9 years ago
Ok, i found the solution... 
http://community.igniterealtime.org/message/217323#217323

Original comment by ad...@radiolynx.ro on 10 Nov 2011 at 4:14