facebook-login-with-ionic-framework icon indicating copy to clipboard operation
facebook-login-with-ionic-framework copied to clipboard

facebookConnectPlugin is not defined at Scope.$scope.facebookSignIn

Open mpliang opened this issue 10 years ago • 5 comments

cloned the project, npm install, ionic serve and got this error... am i missing something?

mpliang avatar Dec 10 '15 19:12 mpliang

where are you testing it? You should test it on a real device or on an emulator.

djabif avatar Dec 11 '15 12:12 djabif

ive tested in browser and on the xcode emulator, both dont work.

mpliang avatar Dec 14 '15 05:12 mpliang

did you install wizcorp plugin as stated on the documentation? do you have the following file in your code: plugins/com.phonegap.plugins.facebookconnect/facebookConnectPlugin.js ?

djabif avatar Dec 21 '15 12:12 djabif

+1 ReferenceError: facebookConnectPlugin is not defined when tap on login btn with this repo.

Tested on Samsung Tab4 (SM-T535, Android 5.0.2), Samsung Galaxy S2 (Android 4.1.2) and Chrome browser ( 48.0.2564.97)

You need to write to readme that you need install the plugin.

  • Can check plugin installation status:
ionic plugin list

cordova-plugin-console 1.0.2 "Console"
cordova-plugin-device 1.1.1 "Device"
cordova-plugin-splashscreen 2.1.0 "Splashscreen"
cordova-plugin-whitelist 1.0.0 "Whitelist"
ionic-plugin-keyboard 1.0.8 "Keyboard"
  • Clone the plugin
git clone https://github.com/Wizcorp/phonegap-facebook-plugin.git
  • Then install the plugin
cordova -d plugin add path-to-plugin/phonegap-facebook-plugin --variable APP_ID="0123456789" --variable APP_NAME="AppName"
  • Check again the plugin list:
ionic plugin list

cordova-plugin-console 1.0.2 "Console"
cordova-plugin-device 1.1.1 "Device"
cordova-plugin-splashscreen 2.1.0 "Splashscreen"
cordova-plugin-whitelist 1.0.0 "Whitelist"
ionic-plugin-keyboard 1.0.8 "Keyboard"
phonegap-facebook-plugin 0.12.0 "Facebook Connect"

And works like charm on devices but not in browser. Cheer! (So you can close this topic after readme update/upgrade.)

Sentence avatar Feb 04 '16 14:02 Sentence

got same issue (with ionic serve, not tested yet on real device) :

0     098515   error    ReferenceError: facebookConnectPlugin is not defined
    at Scope.$scope.facebookSignIn (http://localhost:8100/js/controllers.js:61:5)
    at fn (eval at compile (http://localhost:8100/lib/ionic/js/ionic.bundle.js:21972:15), <anonymous>:4:233)
    at http://localhost:8100/lib/ionic/js/ionic.bundle.js:57514:9
    at Scope.$eval (http://localhost:8100/lib/ionic/js/ionic.bundle.js:24673:28)
    at Scope.$apply (http://localhost:8100/lib/ionic/js/ionic.bundle.js:24772:23)
    at HTMLAnchorElement.<anonymous> (http://localhost:8100/lib/ionic/js/ionic.bundle.js:57513:13)
    at HTMLAnchorElement.eventHandler (http://localhost:8100/lib/ionic/js/ionic.bundle.js:12098:21)
    at triggerMouseEvent (http://localhost:8100/lib/ionic/js/ionic.bundle.js:2865:7)
    at tapClick (http://localhost:8100/lib/ionic/js/ionic.bundle.js:2854:3)
    at HTMLDocument.tapMouseUp (http://localhost:8100/lib/ionic/js/ionic.bundle.js:2927:5)

how to fix this on emulator/ ionic serve ?

lordlothar99 avatar Jun 22 '16 17:06 lordlothar99