Hey All,
This is my first post. I am enjoying developing in Ionic.
Up to this point everything has been a breeze, and a joy to code in, but I have spent the last three days messing the facebook-connect-plugin.
I am doing most of my testing with the Browser so I can view the specific JS issues in Chrome. with the facebook-connect-plugin, there is some checking if you are in browser
Where I am at currently
facebook-connect-plugin
ngCordova
following every Tutorial and StackOverflow on the subject I can find.
facing this error
Uncaught Error: [$injector:modulerr] Failed to instantiate module starter due to:
ReferenceError: facebookConnectPlugin is not defined
at browserInit (http://localhost:8000/lib/ngCordova/dist/ng-cordova.js:2074:7)
while not including the JS for the plugin in index.html, but it's not clear to my why I must if it should be injected.
when I do include it my errors are
launching FB SDK
index.js:172 Attempt local load: <script src="phonegap/plugin/facebookConnectPlugin/fbsdk.js" async></script>
index.js:177 Uncaught ReferenceError: module is not defined
ionic.bundle.js:13217 Uncaught Error: [$injector:modulerr] Failed to instantiate module starter due to:
ReferenceError: FB is not defined
at Object.facebookConnectPlugin.browserInit (http://localhost:8000/lib/facebook-connect-plugin/index.js:151:13)
at browserInit (http://localhost:8000/lib/ngCordova/dist/ng-cordova.js:2074:29)
at http://localhost:8000/js/app.js:88:27
at Object.invoke (http://localhost:8000/lib/ionic/js/ionic.bundle.js:13282:17)
at runInvokeQueue (http://localhost:8000/lib/ionic/js/ionic.bundle.js:13188:35)
at http://localhost:8000/lib/ionic/js/ionic.bundle.js:13197:11
at forEach (http://localhost:8000/lib/ionic/js/ionic.bundle.js:9168:20)
at loadModules (http://localhost:8000/lib/ionic/js/ionic.bundle.js:13178:5)
at createInjector (http://localhost:8000/lib/ionic/js/ionic.bundle.js:13104:11)
at doBootstrap (http://localhost:8000/lib/ionic/js/ionic.bundle.js:10462:20)
http://errors.angularjs.org/1.4.3/$injector/modulerr?p0=starter&p1=Referenc…3A%2F%2Flocalhost%3A8000%2Flib%2Fionic%2Fjs%2Fionic.bundle.js%3A10462%3A20)
The module is not defined error is why I question including the JS.
As I have spent several days, trying to get this to work, I now ask if I should go another route.
Main Questions
- Is the facebook-connect-plugin still a good way to go? Most info I find on it is about a year old.
- I see oAuth in ngCordova, but can I test this in the browser?
- What about OpenFB?
- What are you doing?
- Ultimately I want to authenticate Google and perhaps other services as well, what considerations should I make now?
Noob Questions
- Where, typically, in Index.html should one include Plugin's JS files?
- How does this fit in with injection
- Should the facebook-connect-plugin/index.js come before the ngCordova/dist/ng-cordova.js in the JS Includes? And consequently is this the pattern for all ngCordova Plugins?