Page 2 of 3

Facebook connect problem on iOS

Posted: Tue Aug 27, 2013 3:39 pm
by Maryna Brodina

Ok, let me test on device.


Facebook connect problem on iOS

Posted: Tue Aug 27, 2013 3:47 pm
by Maryna Brodina

I can't reproduce it on iPad (iOS 6.1.2). Could you please check if you have Public ticked, generate new .ipa file and install on device? Let us know about result.


Facebook connect problem on iOS

Posted: Tue Aug 27, 2013 4:18 pm
by Manuel Menéndez Román

I've exported another .ipa and installed it on my ipad. These are the screen captures of the process:
Image

First, the login page with the "login with facebook" button. If I click on it, I see the 2nd screen which is facebook asking for permissions. Either if I accept or not the permissions, the 3rd page is a login to appery.

Also, you can see here I have public ticked on test button. Is there anywhere else I should check it?

Image

Thanks


Facebook connect problem on iOS

Posted: Tue Aug 27, 2013 5:08 pm
by Anton Artyukh5836028

Hi,

Can you show me your code for open facebook login page and example of redirect URL that you send to facebook?


Facebook connect problem on iOS

Posted: Tue Aug 27, 2013 5:55 pm
by Manuel Menéndez Román

Here's the code for the on click of the button:

var redirectUrl = FacebookPublishing_Settings['redirect_uri'];

var url = 'http://www.facebook.com/dialog/oauth?...='+ FacebookPublishing_Settings['client_id'];
url += '&redirect_uri=' + redirectUrl;
url += '&scope=email,user_birthday,publish_actions';
url += '&state='+OAuth.nonce(17);

var cb = null;
if(window.plugins) {
cb = window.plugins.childBrowser;
}
if (cb != null) {
cb.onLocationChange = function (url) {
if(url.indexOf(redirectUrl) === 0) {
/* if user successfully logged in /
cb.close();
var vars = parseUrlVars(url);
localStorage.setItem('code', vars.code ); / store secret code /
Tiggzi.navigateTo('FB_after_login', {reverse: false}); / Navigate to page 'result' */
}
};

Code: Select all

cb.showWebPage(url); 

}
else {
var iframe = document.createElement("IFRAME");
iframe.setAttribute("src", url);
iframe.style.top = 0;
iframe.style.bottom = 0;
iframe.style.left = 0;
iframe.style.width = 100+'%';
iframe.style.height = 100+'%';
iframe.style.zIndex = 99999;
iframe.style.position = 'absolute';
iframe.onload = function() {
var self = this;
var vars = parseUrlVars(self.contentWindow.location.href);
if(vars['code']) {
//localStorage.setItem('code', vars.code + '_'); /* store secret code /
localStorage.setItem('code', vars.code ); / store secret code /
$(iframe).remove();
Appery.navigateTo('FB_after_login', {reverse: false}); / Navigate to page 'facebookAfterLogin' */
}
};
document.body.appendChild(iframe);

};

redirect_uri is set on FacebookPublishing_Settigns service to:
http://appery.io/app/view/ea360a9a-d9...

What else do you need? This app is shared with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a so you can check it out.

As I said, it is working fine on android.

Thanks


Facebook connect problem on iOS

Posted: Wed Aug 28, 2013 10:26 am
by Maryna Brodina

Hello! Open FacebookPublishing_Settings and change redirect_uri value, there is a GUID of another project
Image


Facebook connect problem on iOS

Posted: Mon Sep 02, 2013 11:49 am
by Manuel Menéndez Román

Yes, that was a problem... Thanks

But know I'm having an error exporting the .ipa

I'm using the same developer certificates as before (I've been able to export .ipa files with them). I get the "Oh no! It wasn't supposed to happen but the build failed." message after some 30 seconds.

What could be the problem here?


Facebook connect problem on iOS

Posted: Mon Sep 02, 2013 11:53 am
by Maryna Brodina

Hi, what bundle id you use?


Facebook connect problem on iOS

Posted: Mon Sep 02, 2013 11:55 am
by Manuel Menéndez Román

com.awakt.sellopolis


Facebook connect problem on iOS

Posted: Mon Sep 02, 2013 11:56 am
by Maryna Brodina

Let me check logs... I'll update.