Start a new topic

Kinvey Titanium Facebook and KINVEY_DEBUG

Hi


I am trying to login with Facebook to my app, but the success of error callbacks are not being fired. If I try to load the app without facebook installed, I get sent to the Facebook site, my app gets verified and then safari gives me an error (I guess it needs to open the app again). 


If the Facebook app is installed, I get the native iOS alert asking to auth with Facebook but then when I press OK, nothing gets outputted in the console. This is my code (before this is called, activeUser is null):


 

	var promise = Kinvey.Social.connect(null, 'facebook', {
	    appId   : '173691602736396',
	    success: function(response) {
	        console.log('Facebook success', response);
	    },
	    error: function(response) {
	    	console.log('facebook error', response);
	    }
	});

 

Also I have tried to put KINVEY_DEBUG = true in my kinvey.js file, but no extra debug is output


Any help would be appreciated


Thanks!


1 person has this question

Try with SDK 4.0.0RC4 and Facebook version 4. 


With 3.5.1.GA, Kinvey Facebook doesn't work.


Regards

Hey!


I began talking to the guys at Kinvey, but I'm yet to hear from them, it's been over a month now... :(


Hi, 


How did you solve this issue? I am facing the same issue with Facebook login in Titanium.


Is that something wrong from the client side or the server side?


Thanks,

Just sent it again,


Thanks!

Gurmukh:  


I'm not seeing any email from you?


Thanks, 

Thanks! Have sent you an email.

Gurmukh,  can you please share the source code for the entire project with us as we've having difficulty reproducing the error at this time?   You can email me at damien@kinvey.com


Thanks,

Hi there,


Yes, I have enabled iOS, please see below screenshot:



Sorry to keep asking this but did you add iOS as a platform in your app settings on Facebook like this?



Hi Thomas, 


Thanks for the KINVEY_DEBUG tip, I can now confirm I see the calls made in the console. Unfortunately, I am still no wiser with the Facebook login.


This is the console log output:

 

[INFO] :   (
[INFO] :       "Setting the active user.",
[INFO] :           {
[INFO] :           0 = "<null>";
[INFO] :       }
[INFO] :   )
[INFO] :   active User <null>
[INFO] :   connect to FB now
[INFO] :   (
[INFO] :       "Linking a social identity to a Kinvey user.",
[INFO] :           {
[INFO] :           0 = "<null>";
[INFO] :           1 = facebook;
[INFO] :           2 =         {
[INFO] :               appId = 1*********6;
[INFO] :               error = "<KrollCallback: 0x170079a80>";
[INFO] :               success = "<KrollCallback: 0x17007aec0>";
[INFO] :           };
[INFO] :       }
[INFO] :   )
[INFO] :   (
[INFO] :       "Initiating the Facebook OAuth2.0 flow.",
[INFO] :           {
[INFO] :           0 =         {
[INFO] :               appId = 1*********6;
[INFO] :               create = 1;
[INFO] :           };
[INFO] :       }
[INFO] :   )

 


And this is my JS code:


  

	var promise = Kinvey.Social.connect(null, 'facebook', {
	    appId   : '1*********6',
	    success: function(response) {
	        console.log('Facebook success', response);
	    },
	    error: function(response) {
	    	console.log('facebook error', response);
	    }
	});

  

Hi Gurmukh,


In order to get the KINVEY_DEBUG logs to show please type KINVEY_DEBUG = true in your alloy.js file to set KINVEY_DEBUG to true on the global namespace. The documentation says this is done by typing var KINVEY_DEBUG = true but by doing this you are are overwriting the var used internally by the library. Simply remove the var in front of KINVEY_DEBUG. 


If logs are still not showing up then please let us know. As well, did the issue with the with the Facebook login get resolved when you added iOS as a platform to your application at https://developer.facebook.com?

Thank you for this, as in my initial question, I have tried setting the debug value as in that link but it still doesn't seem to output. I'll try with the new 8.3 iOS ipdate.

Ah right, Titanium,  got me mixed up by posting on the iOS forum:


http://devcenter.kinvey.com/titanium/guides/troubleshooting

Thanks for this link however I'm using the Kinsey plugin for titanium, I assume the configuration would be different?

Gurmukh:  You can learn more about enabling debugging in our iOS troubleshooting guide, available over here:


http://devcenter.kinvey.com/ios/guides/troubleshooting


Please let me know if you need anything else,

Login or Signup to post a comment