New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Error calling method on NPObject. #316
Comments
Try using asking for {scope: "email"} only, that should help with first login. |
Thanks @JLNNN For your fast response. Yes it really worked 👍 But not all :( as expected. Now it shows "Cordova Facebook Connect plugin initialized successfully" and login prompt appears. But callback is not firing.
I can see api call results in logcat warning with following messages, I've set up the package name, class name (com.facebook.LoginActivity) key hashes and enabled the login |
I think it's a bug in the plugin. You can get the email scope, but not ask for publish_actions, because if you try that after asking for the email address, you'll get that "Attempted to send a second callback" message. I tried {scope: 'email,publish_actions'} on iOS and it's working fine. If you do that on Android, you'll get an NPObject-error. |
I have a very similar issue: http://stackoverflow.com/questions/17580796/phonegap-facebook-plugin-error-calling-method-on-npobject I got it yesterday after updating to android SDK tools 22, everything was fine before. The login process results in an NPObject error. The error occurs even with the hackbook demo provided by the author of the plugin. |
I tried #307 which says it works if you use your app in release mode (right click on project -> android tools -> export as sign app). It didn't do the trick for me and yes I changed in facebook settings with the result of keytool -exportcert -alias release -keystore releasekey.keystore | openssl sha1 -binary | openssl base64 Does it work for you ? And #312 seems to have the same problem. |
Any fixes to this problem? I have the exact same problem as issue #312 I've used Cordova 2.3.0, 2.5.0 and 2.7.0. I don't get any "Cordova Facebook Connect plugin initialized successfully" messages and when I click on the Login button on the Simple Example it asks me to given my Facebook App access to my info but this does nothing i.e. Facebook itself isn't updated with the app and probably hence why the callback isn't firing? Please any help would be appreciated!! |
I just updated my iOS and Android projects with the latest Facebook SDK and the latest PhoneGap Facebook plugin and it seems to work now. No more errors and I get two requests when I login. One for accessing email, public timeline and friendslist and one for publishing actions. NICE! |
Do you use the latest fb plugin with phonegap 3.0? |
No, I'm using PhoneGap 2.9.0 since I think 3.0 is not supported yet. |
Closing. Out-of-date. |
I'm using cordova 2.8 with facebook-android-sdk-3.01
When I call FB.login(null, {scope: 'email,user_birthday,read_stream,publish_stream,offline_access'}); It throws following error in logcat for my app
Error: Error calling method on NPObject.
at Object.androidExec as exec
at Object.login (file:///android_asset/www/lib/cdv-plugin-fb-connect.js:29:17)
at Object.ui (file:///android_asset/www/lib/facebook_js_sdk.js:5118:37)
at Object.login (file:///android_asset/www/lib/facebook_js_sdk.js:6150:8)
In addition, the "Cordova Facebook Connect plugin initialized successfully." message from cdv-plugin-fb-connect.js file or error alert message doesn't appear.
I tried with cordova 2.5 for sample Hackbook app and it works fine.
For cordova 2.8 it keeps showing "Loading Hackbook" message but no errors or "Cordova Facebook Connect plugin initialized successfully" message prints on logcat.
I checked #303 issue also wich seems close to this issue. But it's not the reason.
So I think this may be a bug for cordova 2.8.
Any help to resolve this issue appreciate.
The text was updated successfully, but these errors were encountered: