ProGM
ProGM

Reputation: 7108

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:

https://github.com/phonegap/phonegap-facebook-plugin

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:

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?

Upvotes: 3

Views: 2549

Answers (1)

ProGM
ProGM

Reputation: 7108

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

It's incredibly simple to integrate.

EDIT:

example:

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

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):

Upvotes: 1

Related Questions