Facebook Login Not working - recenty

You must Login before you can answer or comment on any questions.

Hi All,

I have used Facebook Login in my Titanium App, It was works fine until last week. But for the last two days I am getting error while new user Login with Facebook.

Facebook Login Error Screen

Also I did followed the below thread http://developer.appcelerator.com/question/139217/facebook-login-not-working-today

Modified my Facebook app's advanced settings and set the Authentication to native/desktop

But still I am getting the Error.

Is there any configuration need at http://developers.facebook.com/?

Here Is my sample code

Titanium.Facebook.appid = "xxxxxxxxxxx"; //Production
Titanium.Facebook.permissions = ['publish_stream', 'read_stream', 'email', 'user_about_me'];
 
var fbSignupBtn = Ti.UI.createButton({
    title: "Login with Facebook",
    width: 160,
    left: 10,
    top: 25
});
win.add(fbSignupBtn);
 
fbSignupBtn.addEventListener('click', function () {
    Titanium.Facebook.authorize();
});
 
Titanium.Facebook.addEventListener('login', function (e) {
    if (e.success) {
        //some actions here
    } else if (e.error) {
        alert("Error = " + e.error);
    } else if (e.cancelled) {
        alert("canceld");
    }
});

I am using Titanium 2.1.1. Thanks in Advance

— asked 9 months ago by prabu durai
3 Comments
  • Even KitchenSink also I am getting the Facebook Login error

    KitchenSink Facebook Login error

    — commented 9 months ago by prabu durai

  • I am also getting the same problem... plz any one tell the solution. this problem raise only recently. one week before its work fine.

    — commented 9 months ago by prakash muthaian

  • have you tried the instruction in prabu durai comment down?

    — commented 9 months ago by Mhd Zaher Ghaibeh

1 Answer

am using this code in 2 programs and they are working fine

Titanium.Facebook.appid = "xxxxxxxxxxxxxxxx";
        Titanium.Facebook.permissions = ['publish_stream'];
 
        var share = Ti.UI.createButton({
            backgroundImage : 'fb_share.png',
            height : '42',
            width : '122',
            top : 10,
            left : 10,
            link : images[n].link,
        });
 
        share.addEventListener('click', function(e) {
            if (!Ti.Facebook.loggedIn) {
                var sourceLink = e.source.link;
                Ti.Facebook.addEventListener('login', function(e) {
                    if (e.success) {
                        fbSharing(sourceLink);
                    } else if (e.error) {
                        alert(e.error);
                    } else if (e.cancelled) {
                        alert("Canceled");
                    }
                });
                Ti.Facebook.authorize();
            } else {
                fbSharing(e.source.link);
            }
        });
and here is the source of fbSharing function
var fbSharing = function(link) {
 
    var resultNotification = Ti.UI.createNotification({
        message : 'sharing_done',
        duration : Ti.UI.NOTIFICATION_DURATION_LONG
    });
    Ti.Facebook.request('links.post', {
        url : link
    }, function(e) {
        if (e.success) {
            resultNotification.message = 'sharing_done';
            resultNotification.show();
        } else {
            resultNotification.message = 'sharing_error';
            resultNotification.show();
        }
    });
}

— answered 9 months ago by Mhd Zaher Ghaibeh
answer permalink
1 Comment
  • I dont think this problem from code. I suspect this would be Facebook API problem. Can you do the below things go to your

    Login to Facebook account  -> Account Settings -> General -> Apps
    Here you can find list of Facebook Apps which all authorized by you. Select your app and delete it. Then login with Titanium App(Using Facebook login).

    Let me know if you got any error.

    — commented 9 months ago by prabu durai

Your Answer

Think you can help? Login to answer this question!