Facebook apprequests dialog always returns cancelled Titanium Android?
Asked Answered
E

1

10

I'm using facebook 3.0.1 titanium module. In Android, the Facebook apprequests dialog always returns as cancelled, even while the actual apprequest is send as can be seen on Facebook. Because of this I cannot store the requestid in my back-end, which makes the apprequest useless.

But in iOS it works fine.

This is my code

var fb = require('facebook');
fb.appid = 'my_app_id';
fb.permissions = ['publish_stream', 'read_stream', 'email']; // Permissions your app needs
fb.forceDialogAuth = true;

fb.addEventListener('login', function(evt) {
    if (evt.success) {
            fb.dialog("apprequests", {
              message:"LeaugeNation",
              // max_recipients : "2"
            }, function(response) {   
                alert(JSON.stringify(response));
                if(response.result) {
                        alert("send friend req");
                        // sendFacebookInvite(e.result);                                    
                    }    
            });

    } else if (evt.error) {
        alert("error");
    } else if (evt.cancelled) {
        alert("cancelled");

    } else {
            alert("default");
    }
});

fb.authorize();

If i run the code i'm getting the following result

{"cancelled":true,"code":-1,"success":false}

I made the following changes, but did't got the result.

  • changed the appid won't change result
  • changed the Key Hash for that Facebook App

Thanks in advance.

Can you please tell me what change, that i want to made to get the correct result in Android.

Eudy answered 22/1, 2014 at 10:6 Comment(0)
D
1

You must look to facebook setting. did you register Your activity and allow the permission from developers site which you are using here. Also If you are not exporting your app please export properly with proper keystore.

Danaedanaher answered 28/6, 2014 at 11:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.