Wizcorp / phonegap-facebook-plugin

The official plugin for Facebook in Apache Cordova/PhoneGap
Other
1.91k stars 2k forks source link

Problems in "require ();" #1331

Open joaomarcusjesus opened 8 years ago

joaomarcusjesus commented 8 years ago

Hi guys!

I am having a problem in an application using intel xdk to use plguin. And the following problem happens

"Uncaught ReferenceError: require is not defined" var exec = require("cordova.exec");

Has this happened to anyone?

Thanks :)

dnoliver commented 8 years ago

Hello @joaomarcusjesus,

can you post some code to see what is happening? I think that problem is not related to this plugin, but it is a problem with the application code itself

joaomarcusjesus commented 8 years ago

Thanks @dnoliver

I've solved the problem. Yes, it was not the plugin. But as I researched that "codorva.js" there is no browser but yes in the application.

dondragon2 commented 8 years ago

how did you solve this? I am getting the same on android device.

joaomarcusjesus commented 8 years ago

@dondragon2
My problem was that I was trying to test FacebookConnectPlugin in a browsers. But my application used cordova.js and it does not work in browsers. So I managed the apk and tested it on my cell phone

This solves your problem??

Cya

dondragon2 commented 8 years ago

No. It works in the browser but is failing on the device on that line.

joaomarcusjesus commented 8 years ago

Okay, I'll go find it and give it a go.

Cya

renanbastos93 commented 7 years ago

Hello guys,

I have problem equals of you, please help.

The device, error "require", because in browser is success, using IONIC

thanks