MAXSTEELTURBOGO / facebook-actionscript-api

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

Facebook Actionscript API crash #48

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

I copied the following basic code from
http://www.insideria.com/2009/05/using-the-brand-new-facebook-a.html

------------------------------------------------------------------
import com.facebook.data.users.GetInfoData;
import com.facebook.utils.FacebookSessionUtil;
import com.facebook.data.users.FacebookUser;
import com.facebook.data.users.GetInfoFieldValues;
import com.facebook.commands.users.GetInfo;
import com.facebook.net.FacebookCall;
import com.facebook.events.FacebookEvent;
import com.facebook.Facebook;
import flash.utils.*;

var fbook:Facebook;
var session:FacebookSessionUtil;
var user:FacebookUser;

session = new FacebookSessionUtil("YOUR_API_KEY", "YOUR_SECRET", loaderInfo);
session.addEventListener(FacebookEvent.CONNECT, onFacebookConnect, false,
0, true);

fbook = session.facebook;
fbook.login(true);

login_btn.addEventListener(MouseEvent.CLICK, connectToFB);

function connectToFB(e:Event):void {
    session.validateLogin();
}

function onFacebookConnect(e:FacebookEvent):void{
    trace("Is facebook connected: " + fbook.is_connected);           
}
------------------------------------------------------------------

where login_btn is a button on my stage.

What is the expected output? What do you see instead?

I expect a simple "Is facebook connectd: true". Instead, the program
crashes. I realize the problem is at session.validateLogin() but don't know
how to solve it.

What version of the product are you using? On what operating system?

Mac OSX 10.5.6
Flash CS3 v9.0
Facebook actionscript library v3.0 (I tried 3.1 but had the same results)
Firefox 3.0.10

Please provide any additional information below.

-I created a flash facebook application as explained before (lets say app.fla).
-When I created a new facebook app at facebook, and used this app key and
secret on the desktop flash app, the program crashed.
-I used the app key and secret from another web app I did before (changing
its type to desktop) on my flash app and it worked!
-I created another flash app and tried to connect it to the same facebook
app using the same key and secret and it crashed once again.
-I duplicated app.fla calling it app2.fla (no changes made) connecting to
the same key and secret and it crashed!

Any idea of what I might be doing wrong?

Online

Original issue reported on code.google.com by guille.c...@gmail.com on 21 May 2009 at 2:47

GoogleCodeExporter commented 9 years ago
Anyone figured out this problem? I have the same issue surrounding 
validateLogin()

Original comment by XaeroDeg...@gmail.com on 22 Dec 2009 at 3:19

GoogleCodeExporter commented 9 years ago
same here

Original comment by gla...@gmail.com on 14 Apr 2010 at 12:06

GoogleCodeExporter commented 9 years ago
I had the same problem and figured out that you have to allow storing 
SharedObject
data (Player settings). If not, your application will crash.

Original comment by janmassb...@gmail.com on 17 Apr 2010 at 12:43

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