Closed GoogleCodeExporter closed 9 years ago
Facebook.init("APP_ID", myFunction);
This call return nothing.
I have a trace in myFunction, but the call never arrive in this function. What
happen!?!? I'm using Firefox and simple AS3.
Original comment by francesc...@gmail.com
on 4 Nov 2010 at 9:37
[deleted comment]
[deleted comment]
I'm having the same issue, init's callback parameters, success and fail, are
null. The API isn't ready after that point. This is on the FB app, I'm able to
run the app using the AIR player and the Desktop object without a problem, but
using the Facebook web object, no dice. This is browser independent.
Original comment by papavik...@gmail.com
on 10 Nov 2010 at 5:44
@papaviking: when you say "browser independent" do you mean it occurs even if
you're not using some sort of privacy mode?
Original comment by michael....@gmail.com
on 10 Nov 2010 at 5:49
[deleted comment]
Anyone ever find a solution to this?
Original comment by mike%via...@gtempaccount.com
on 26 Jan 2011 at 8:22
I would suggest using the new graph API (v1.5). It doesn't use FBJSBridge.js
and has a lot more bug fixes.
Original comment by rovertn...@gmail.com
on 4 Feb 2011 at 4:04
I have this in Chrome in normal mode. I've found it works ok for some users and
not for others.
I think it might be something to do with the user having ot authorise the app,
you know that permission prompt you get when you access an app for the first
time. If you haven't manually made that appear for a user then Facebook.init()
won't work. At least that's what my current thinking is. I'm still trying to
find out how you force that prompt to appear.
Original comment by bedroom...@gmail.com
on 8 Feb 2011 at 8:18
You shouldn't have to force that permissions window to appear. After calling
Facebook.init, you should get a fail object if the user isn't logged in. If the
user isn't logged in, you should call Facebook.login. Facebook should then take
care of the whole log in process as well as confirming permissions.
Original comment by rovertn...@gmail.com
on 9 Feb 2011 at 4:34
I'm getting an identical issue to the original poster: a second call to
Facebook.init(APP_ID, onInit); will return a double null/null for both expected
result and fail objects.
I can error-check for a double-null, but since (I assume) Facebook.init() has
to be triggered explicitly by user interaction (i.e. clicking on a button), I
can't call that action purely from code - I have to persuade the user to click
the button again.
In my case, I'm loading an .swf as a child into another .swf, and the child is
doing the Facebook connect thing. If I close and destroy the child, then
re-open it and click to connect to Facebook, the result and fail objects both
come through as null.
Interestingly, this actually happens if I load somefile.swf into the parent
.swf, connect to Facebook (successfully), then close and destroy it, THEN load
differentfile.swf into the parent and connect to Facebook - same double-null
result. In a completely different file. Whoopee-doo.
Original comment by lawriema...@gmail.com
on 16 Feb 2011 at 10:16
Okay I was also banging my head on this like it's first day of school.
Here's the hack I created which works miracles.
public class FacebookConnect
{
public static var isConnected:Boolean = false;
public static var connecting:Boolean = false;
private var initDone:Function;
private var perms:Object;
private var tm:uint;
private var appID:String
public function FacebookConnect( _appID:String, _perms:Object, _initDone:Function )
{
perms = _perms;
initDone = _initDone;
appID = _appID;
init( );
}
private function init( ):void
{
connecting = true;
Facebook.init( appID );
if( Facebook.getSession( ) == null)
{
freshLogin( );
checkForSession( );
}else{
loginDone( );
}
}
private function checkForSession( ):void
{
var fs:* = Facebook.getSession( ).uid;
Logger.log("FacebookConnect.checkForSession.uid."+fs);
if( null != fs)
{
loginDone( );
return;
}else{
setTimeout( checkForSession, 1000);
}
}
private function loginDone( ):void
{
Facebook.init(
appID,
initComplete,
{
channelURL : 'http://mjdev.rtedge.ca/mpbj/channel.html'
}
);
}
private function freshLogin( ):void
{
Logger.log("FacebookConnect.freshLogin");
login( );
}
private function login( ):void
{
perms['channelURL'] = 'http://mjdev.rtedge.ca/mpbj/channel.html';
Facebook.login
(
null,
perms
);
}
private function initComplete(s:Object,f:Object):void
{
Logger.log("FacebookConnect._initDoneInternal."+s+":"+f);
FacebookConnect.isConnected = s != null;
if( s != null ) initDone( s , f );
Logger.log( "FacebookConnect."+FacebookConnect.isConnected+":"+JSON.encode(s)+":"+JSON.encode(f) );
}
}
Original comment by marcin.a...@gmail.com
on 28 Jun 2011 at 7:45
Original comment by edwar...@gmail.com
on 6 Oct 2011 at 4:25
Original issue reported on code.google.com by
michael....@gmail.com
on 3 Nov 2010 at 12:11