我收到此错误“找不到变量:FBSDKApplicationDelegate”

时间:2018-12-13 07:02:51

标签: facebook-javascript-sdk nativescript

找不到变量:FBSDKApplicationDelegate,

app.js

>  const application = require("tns-core-modules/application");
> 
> if(application.ios){ `
> 
> var AppDelegate = UIResponder.extend({
> applicationDidFinishLaunchingWithOptions :function (application,
> launchOptions) { var gglDelegate = false; try { var errorRef = new
> interop.Reference();
> GGLContext.sharedInstance().configureWithError(errorRef); var signIn =
> GIDSignIn.sharedInstance(); gglDelegate = true; } catch (error) {
> console.log(error); } var fcbDelegate =
> FBSDKApplicationDelegate.sharedInstance().applicationDidFinishLaunchingWithOptions(application,
> launchOptions); // facebook login delegate return gglDelegate ||
> fcbDelegate; }, applicationOpenURLSourceApplicationAnnotation :
> function (application, url, sourceApplication, annotation) { var
> fcbDelegate =
> FBSDKApplicationDelegate.sharedInstance().applicationOpenURLSourceApplicationAnnotation(application,
> url, sourceApplication, annotation); // facebook login delegate var
> gglDelegate =
> GIDSignIn.sharedInstance().handleURLSourceApplicationAnnotation(url,
> sourceApplication, annotation); // google login delegate return
> fcbDelegate || gglDelegate; }
> 
> },{ name: "AppDelegate", protocols:[UIApplicationDelegate]
> 
> }); application.ios.delegate = AppDelegate; } application.run({
> moduleName: "app-root" });

https://github.com/mkloubert/nativescript-social-login#javascript中给出的js代码。不起作用,我正在使用nativescript(javascript),没有任何TS,angular或view框架。

0 个答案:

没有答案
相关问题