Phonegap facebook plugin: various issues with android

I’m trying to integrate Phonegap 3.1 with phonegap-facebook-plugin, to make my application able to login with facebook:

After various searches I found a way to make it work with last version of phonegap, but I’m having 2 main issues:

1) I really don’t understand how to configure the “Native Android App” on facebook developer panel, in particular the “Class Name”.

Information I found online are a bit confusing. I tried:

  • com.facebook.LoginActivity
  • com.phonegap.plugins.facebookconnect

With both of them I receive this error in the logcat:

Failed to find provider info for com.facebook.katana.AttributionIdProvider

Even if this error is thrown, facebook login works, but:

2) FB.init returns status unknown even if I’m already logged and, when I call FB.login, I receive:

You already authorized appname.

It’s a bit frustrating that the app user have to confirm authorization everytime he opens the app…

I’m doing something wrong?

Enquirer: ProGM


Solution #1:

If someone is interested, I finally resolved leaving the facebook connect plugin and using facegap

It’s incredibly simple to integrate.



    app_id      : 'xxxxxxxxxxxxxxxx',
    scope       : 'user_photos',
    host        : '', //App Domain ( Facebook Developer ).
    onLogin     : function (event)
        if (event.message == "Success")
            alert("LOGIN WORKED!");
    onLogout    : function (event) {
        if (event.status === 1)

Important: the host parameter must be a valid URL in your app domain (the one you set in the facebook app configuration). It could be also a blank page, it will be never be loaded, but needs to be a working url, in order to make facegap work.

I also created a fork with a bug fix and a new function (feed functionality):

Respondent: ProGM

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Leave a Reply

Your email address will not be published.