Obed Eugene
Posts: 0
Joined: Wed Jul 03, 2013 5:37 pm

Error with facebook access token

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);
};

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

Error with facebook access token

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

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

Error with facebook access token

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

Obed Eugene
Posts: 0
Joined: Wed Jul 03, 2013 5:37 pm

Error with facebook access token

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

Image

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

Error with facebook access token

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.

Obed Eugene
Posts: 0
Joined: Wed Jul 03, 2013 5:37 pm

Error with facebook access token

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...

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

Error with facebook access token

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.

Obed Eugene
Posts: 0
Joined: Wed Jul 03, 2013 5:37 pm

Error with facebook access token

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
}
}

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Error with facebook access token

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.

Obed Eugene
Posts: 0
Joined: Wed Jul 03, 2013 5:37 pm

Error with facebook access token

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

Return to “Issues”