Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Facebook connect problem on iOS

Ok, let me test on device.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Facebook connect problem on iOS

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.

Manuel Menéndez Román
Posts: 0
Joined: Sat Jun 22, 2013 9:12 am

Facebook connect problem on iOS

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

Anton Artyukh5836028
Posts: 0
Joined: Wed May 08, 2013 12:57 pm

Facebook connect problem on iOS

Hi,

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

Manuel Menéndez Román
Posts: 0
Joined: Sat Jun 22, 2013 9:12 am

Facebook connect problem on iOS

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Facebook connect problem on iOS

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

Manuel Menéndez Román
Posts: 0
Joined: Sat Jun 22, 2013 9:12 am

Facebook connect problem on iOS

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?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Facebook connect problem on iOS

Hi, what bundle id you use?

Manuel Menéndez Román
Posts: 0
Joined: Sat Jun 22, 2013 9:12 am

Facebook connect problem on iOS

com.awakt.sellopolis

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Facebook connect problem on iOS

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

Return to “Issues”