Question

I'm trying to include a Facebook app in a section of a Flash website developed in GAIA Framework. I've followed many examples and tutorials and I've tried to do a simple login on the Nav Page.

My imported classes (ALL of the facebook api?):

import com.adobe.serialization.json.JSON;
import com.facebook.graph.Facebook;
import com.facebook.graph.controls.*;
import com.facebook.graph.core.*;
import com.facebook.graph.data.*;
import com.facebook.graph.net.*;
import com.facebook.graph.utils.*;

My var with facebook id:

private var FB_app_id:String = 'my app id goes here :)';

My constructor:

    public function NavPage()
    {
        super();
        alpha = 0;          
        init();
        Facebook.init(FB_app_id);
    }

So, every time I try to publish, the following error appears:

C:\PROJECT ZERO\1 - Proyectos\2p - WEB\src\com\facebook\graph\data\FQLMultiQuery.as, Line 80 1061: Call to a possibly undefined method encode through a reference with static type Class.

Line 80 of FQLMultiQuery.as refers to the following code:

    public function toString():String {
        return JSON.encode(queries);            
    }

What could be wrong? What am I doing wrong? I'm starting to think it might be an incompatibility issue between GAIA and the Facebook API.

Was it helpful?

Solution

It seems like you have a conflict with native JSON (since flash player 11) and the JSON from com.adobe.serialization.json package.

My solution for this is to rename the second one. Or start using the new JSON instead and exclude com.adobe.serialization.* from project.

reference:
http://www.pippoflash.com/index.php/2012/06/20/flash-player-10-and-flash-player-11-json-json-conflict-solved/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top