Giter VIP home page Giter VIP logo

Comments (9)

holm0563 avatar holm0563 commented on May 16, 2024

I'm getting the same problem

from phonegap-facebook-plugin.

tb avatar tb commented on May 16, 2024

I get the same error.

To get more details I added e.printStackTrace(); to onFacebookError callback:

    public void onFacebookError(FacebookError e) {
        Log.d("FB", "facebook error");
        e.printStackTrace();
        this.fba.error("Facebook error: " + e.getMessage(), callbackId);

    }

Here is the error:

D/FB ( 517): facebook error
W/System.err( 517): com.facebook.android.FacebookError: Failed to receive access token.
W/System.err( 517): at com.facebook.android.Facebook$1.onComplete(Facebook.java:311)
W/System.err( 517): at com.facebook.android.FbDialog$FbWebViewClient.shouldOverrideUrlLoading(FbDialog.java:133)
W/System.err( 517): at android.webkit.CallbackProxy.uiOverrideUrlLoading(CallbackProxy.java:216)
W/System.err( 517): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:323)
W/System.err( 517): at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err( 517): at android.os.Looper.loop(Looper.java:123)
W/System.err( 517): at android.app.ActivityThread.main(ActivityThread.java:3683)
W/System.err( 517): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 517): at java.lang.reflect.Method.invoke(Method.java:507)
W/System.err( 517): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
W/System.err( 517): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
W/System.err( 517): at dalvik.system.NativeStart.main(Native Method)

from phonegap-facebook-plugin.

tb avatar tb commented on May 16, 2024

This is problem with offline_access permission which results in token expiry is 0.

I have removed offline_access, created new Facebook app, added new aid and FB plugin is working again.
See http://stackoverflow.com/questions/7711097/android-facebook-app-access-token-expiry-expires-in-is-always-0

from phonegap-facebook-plugin.

filmaj avatar filmaj commented on May 16, 2024

Should not be an issue anymore with latest updates.

from phonegap-facebook-plugin.

dokterbob avatar dokterbob commented on May 16, 2024

@filmaj This issue seems to be still standing: for tokens with the offline_access permission, the expiration time is still 0.

from phonegap-facebook-plugin.

emibap avatar emibap commented on May 16, 2024

Hi guys. I think that this issue remains. I've followed every setp installing the plugin and setting a new project with the simple example.
I can login without trouble, but when I click on the "Me" button I get the message requesting an active access token...
From what I can see there's no offline_access permission in the example, so it must be another thing.

Moreover, when I login I can see that a token has been generated:
03-14 17:28:27.011: D/ConnectPlugin(358): Bundle[{access_token=AAADI9VGWIWQBAKZCaLOfEhOTktn4rQ3I0dRprx8r5jwn4LLAeNYfNDBZA4vOIM7XLOB4xdTZBH1M1Hpevf3YAiwcOYh2TD8uHIB2PmVsQZDZD, expires_in=5179361, code=AQCy-Jr2XYYtdqMj4lAV_Jn089msUxN4dsucJu99kG2DoEFsd16bx0frXA1KKDCxsHweF1TJKXJlvMO3rGAH5q9YnpatYW-CkpzAck2zR_wYy7XEqqvoPs6JoEhwN5Q36T74DkXF0xLUAL8kbf4ybsA2UoJJLekCNdFXPwZ8kUWqo7WUJQf5CgQ8tdwwGtAEOvk}]

I don't know if it is a valid one or if it's not saved anywhere, because calling FB.getAccessToken() returns null.

I'm using cordova-1.5.0 in an android platform using eclipse

Thanks

from phonegap-facebook-plugin.

odbol avatar odbol commented on May 16, 2024

I think I've fixed this for Android in Phongap1.4.1. It's a different issue where the new SDK is expecting "authResponse" but getting "session" from the plugin. Here's a quick patch: odbol@0ef84e2

Submitting pull request now.

from phonegap-facebook-plugin.

EmilioBravo avatar EmilioBravo commented on May 16, 2024

@odbol fix worked for me, check my comments at his commig

from phonegap-facebook-plugin.

emibap avatar emibap commented on May 16, 2024

It worked for me too. Thanks!

from phonegap-facebook-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.