Hey guys,
been struggling with a thing here for some days now hope you can help me out on this.
I’m developing a application in as3 that fetches a user profile image by an id from facebook and it works just perfect when I test movie within flash locally. But when I test it with xampp or in my server in any browser it simply doesn’t work…
It gets stuck in the line: Facebook.api(comments.*[commentLoading].@id, completed);
Anyone got this problem before or worked with facebook api? I really could use some help :/
Thanks
no guesses?? :s
- Microlancer Beta Tester
- Sold between 50 000 and 100 000 dollars
- Interviewed on the Envato Notes blog
- Author was Featured
- Author had a File in an Envato Bundle
- Exclusive Author
- Has been a member for 4-5 years
- Item was Featured
- Beta Tester
Well, I haven’t work with that but sometimes when Flash is connecting to external server you will need a “crossdomain.xml” or you need to allow script access by using “allowScriptAccess”.
Yes GoTo have a part of the response, you must load the facebook policy file before downloading images from FB, like this :
Security.loadPolicyFile("http://graph.facebook.com/crossdomain.xml");
var loader:Loader = new Loader();
var context:LoaderContext = new LoaderContext(true);
loader.load(yourUrlRequest, context);
This works for me.
Thanks goTo and baptiste, I’ll give it a shot and tell how it went 
Do I have to call init first? It’s not working :s
Facebook.init("180551898647295", handleLogin);
function handleLogin(session:Object, fail:Object):void {
if (session != null) {
trace("Successfully Logged In");
logged=true;
UserSession=session as FacebookSession;
nextFun();
}
else{
trace("JJJ");
Facebook.login(handleLogin, []);
}
}
This is not working at all, it should pop up a window for the login but it doesn’t. I’m getting confused right now. Locally it traces nothing. On server nextFun is called so as Facebook.login(handleLogin, []);
Anyone worked with this api before that could send me some good examples?
thanks
Well, it seems to be another problem. I think you must have a facebook application with access token to request the graph API , but just installing the flash player debugger for your browser will probably give you more information about this issue.
It doesn’t throw any error, that’s the strangest thing 
Check that cookies are enabled,i know it won’t work otherwise, but this is my last idea
baptiste said
Check that cookies are enabled,i know it won’t work otherwise, but this is my last idea
Nothing :/ thanks anyway.
