MAXSTEELTURBOGO / facebook-actionscript-api

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

FacebookConnectUtil requires loaderInfo object - what about "FLEX"? #88

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Quite simply, I'm stumped.  As a 12 year veteran of Flash forced to learn
Flex, maybe I'm overlooking something....

It seems there's no way to get the FlashVars from a Flex App via a
loaderInfo object - you can only get down to FlashVars via
Application.application.parameters.  

Thus, there's no way to provide this necessary parameter to the
FacebookConnectUtil constructor.  This results in FacebookConnectUtil only
being available to Flash-developed deployments.

Again, am I missing something?  (if so, blame it on 2 days of trying to
debug this issue as a Flex noob)

Thanks,

Matt Pedersen

Original issue reported on code.google.com by m...@ramblingreports.com on 21 Oct 2009 at 4:47

GoogleCodeExporter commented 9 years ago
this is a workaround for you.

extend the FacebookConnectUtil and override any method that requires the 
LoaderInfo
object, replacing it instead with a flashvars object. So anywhere that you pass 
in a
loaderInfo:LoaderInfo, instead pass in a sessionVars:Object and wherever you see
'_loaderInfo.parameters', just replace that with 'sessionVars'

in the meantime, however, requiring a LoaderInfo object instead of the 
LoaderInfo's
parameters object, doesnt make any sense to me. It should be the parameters 
object
you pass in, which would allow for more flexible implementations of the class.

Original comment by pixels...@gmail.com on 19 Nov 2009 at 3:58

GoogleCodeExporter commented 9 years ago
I think you can get a loaderInfo object like this:

var loader:LoaderInfo = Application.application.loaderInfo;

Original comment by rupert.r...@googlemail.com on 26 Nov 2009 at 4:10

GoogleCodeExporter commented 9 years ago
Sorry Rupert, that is "flash only" code...flex deployments are accessed as I 
outline
above Application.application.parameters.  The issue is the typing of
FacebookConnectUtil class...pixelguy's comemnts will fix the problem, but in 
truth,
this part of the class should be updated / rewritten.

FWIW,

Matt

Original comment by m...@ramblingreports.com on 28 Nov 2009 at 1:14

GoogleCodeExporter commented 9 years ago
i've been using the api with flex for some time now-- i see this post is old, 
so i don't know if you solved it.

loaderInfo is indeed accessed using Application.application.loadInfo -- BUT is 
only available after the 
ApplicationComplete event - NOT the creationComplete event, which is fired just 
prior to applicationComplete.

Application.application.parameters is the flashvars.
Application.application.loaderInfo = LoaderInfo object

Original comment by nigam%ni...@gtempaccount.com on 17 Feb 2010 at 8:10

GoogleCodeExporter commented 9 years ago
New release based of Facebook's Graph API is coming soon.  SDK which this issue 
depends on is no longer supported by Facebook.

Original comment by alan...@gmail.com on 29 Sep 2010 at 7:49