0
當我打電話給init()
時,出現錯誤,說明「Facebook」類尚未聲明。網上的每一個教程都有類似的代碼,據說可以工作,所以我猜測它的設置我沒有設置,因爲它看起來像它的進口。(Actionscript 3/Facebook SDK)「Facebook未定義」Facebook.init()不起作用
我的代碼:
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()";
}
}
我的輸出:
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()
您已經添加庫/向名爲.swc構建路徑? – James