Page 2 of 3

Error with facebook access token

Posted: Tue Jul 09, 2013 4:20 pm
by Obed Eugene

Here's what I have on the first page.

var redirectUrl = 'http://appery.io/app/view/d8ca9181-48...';

var url = 'https://www.facebook.com/dialog/oauth...';
url += '&redirect_uri=' + redirectUrl;
url += '&scope=read_stream,user_about_me';
url += '&state='+OAuth.nonce(17);

var cb = null;
if(window.plugins) {
cb = window.plugins.childBrowser;
}
if (cb != null) {
/* Wen native childBrowser plugin must be used to navigate to facebook. /
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 /
Appery.navigateTo('result', {reverse: false}); / Navigate to page 'result' */
}
};

Code: Select all

cb.showWebPage(url); 

}
else {
localStorage.setItem('code', '');
window.open(url);
};


Error with facebook access token

Posted: Tue Jul 09, 2013 4:23 pm
by Maryna Brodina

Did you set correct redirect URL on Facebook developers page?
Image


Error with facebook access token

Posted: Tue Jul 09, 2013 4:25 pm
by Maryna Brodina

Did you set correct redirect URL on Facebook developers page?
Image


Error with facebook access token

Posted: Tue Jul 09, 2013 4:36 pm
by Obed Eugene

Yes, I did. Maybe there's something wrong with the facebook app. I'll create a new one.

Image


Error with facebook access token

Posted: Tue Jul 09, 2013 4:44 pm
by Maryna Brodina

Your project has address http://appery.io/app/view/acb13cd2-29..., but it redirects to http://appery.io/app/view/d8ca9181-48... (please note that ULR has different guid)

and in your comment earlier you've posted this URL http://appery.io/app/view/acb13cd2-29... as redirect one. So looks like you redirect to another project.


Error with facebook access token

Posted: Tue Jul 09, 2013 4:53 pm
by Obed Eugene

My apologies. the code I pasted here was from the tutorial.

In my project, and facebook app, all of the redirect url's are correct: http://appery.io/app/view/acb13cd2-29...


Error with facebook access token

Posted: Tue Jul 09, 2013 5:32 pm
by Maryna Brodina

When I open this link http://appery.io/app/view/acb13cd2-29... and click "Connect" it redirects to http://appery.io/app/view/d8ca9181-48... (note that guids are different). You're trying to redirect to another project.


Error with facebook access token

Posted: Mon Jul 15, 2013 7:03 pm
by Obed Eugene

I created a new facebook app, and a new app on appery and now I'm getting the following error message. Is it possible to add you to my project so you can take a look at it?

http://appery.io/app/view/8e139ca9-3c...

{
"error": {
"message": "This authorization code has expired.",
"type": "OAuthException",
"code": 100
}
}


Error with facebook access token

Posted: Mon Jul 15, 2013 7:08 pm
by Kateryna Grynko

Hi,

Yes, share it with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a and tells us its name so we could take a look.


Error with facebook access token

Posted: Mon Jul 15, 2013 7:34 pm
by Obed Eugene

Okay, I just shared it. The app is called Voutcheapp.