Question

When I call init() I get an error saying the class "Facebook" has not been declared. Every tutorial online has similar code and supposedly works so I'm guessing its a setting somewhere I haven't set because it does look like its getting imported.

My Code:

import flash.display.MovieClip; 
import com.facebook.graph.Facebook;
import com.facebook.graph.net.*;
import com.facebook.graph.data.*;   

public class A_CLASS extends MovieClip {            
    protected var _appID:String = "164534125383085";

    function A_CLASS():void {
        Facebook.init(_appID, logIn);
    }

    function logIn(session:Object, fail:Object):void {
        console.text = "Did Init()";
    }
}

My Output:

ReferenceError: Error #1065: Variable com.facebook.graph::Facebook is not defined.
  at ALPHA_CLASS()[C:\Users\DelphPC\Desktop\FlashProjects\A\A_CLASS.as:11]
  at runtime::ContentPlayer/loadInitialContent()
  at runtime::ContentPlayer/playRawContent()
  at runtime::ContentPlayer/playContent()
  at runtime::AppRunner/run()
  at ADLAppEntry/run()
  at global/runtime::ADLEntry()

No correct solution

OTHER TIPS

ReferenceError: Error #1065: Variable com.facebook.graph::Facebook is not defined.

that means your program cannot see the reference class please check your Build Path SWC or ANE and build your project then retry

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