Grace Yip
Posts: 0
Joined: Wed Sep 11, 2013 7:47 pm

Facebook redirect_uri is required

hi,

some i am trying to make a facebook login with the following tutorial:
http://docs.appery.io/tutorials/build...

but get the following error when running app in browser (the parameter redirect_uri is required)

so i have registered my app with facebook developer i have filled in the redirect url (Website with FB login)

i have setup the js file (Facebook_utils) and i have the following code attachted to the login button as a click event.

var redirectUrl = 'http://appery.io/app/view/fab7f856-df...';

var url = 'https://www.facebook.com/dialog/oauth...';
url += '&redirect_uri=' + redirectUrl;
url += '&scope=user_education_history,friends_education_history,user_work_history,friends_work_history';
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);
};

can someone tell me why i get the error parameter redirect_uri is required ?

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Facebook redirect_uri is required

Hello!

Please check browser console if there are errors, send us screen shots.
Make sure you didn't miss something in tutorial.

Grace Yip
Posts: 0
Joined: Wed Sep 11, 2013 7:47 pm

Facebook redirect_uri is required

Image

i dont understand why i get an error when i only copy pasted the code from the tutorial

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

Facebook redirect_uri is required

Hi,

We are sorry, there is an error in our documentation.
Please replace:
codeif(params.indexOf('#')>=0) {/codewith the following:
codeif(params.indexOf('#')>=0) {/code

Grace Yip
Posts: 0
Joined: Wed Sep 11, 2013 7:47 pm

Facebook redirect_uri is required

hi,

i replace the code as you suggested but i still get the error. thought this time when i check it with the error console in firefox i get no error message....

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

Facebook redirect_uri is required

Hello! Sorry for late reply. Did you get the same error? Did you get that error when you were trying to connect to Facebook or get data?

Grace Yip
Posts: 0
Joined: Wed Sep 11, 2013 7:47 pm

Facebook redirect_uri is required

Hi

I get the same error when trying to connect (login with FB)....

Grace Yip
Posts: 0
Joined: Wed Sep 11, 2013 7:47 pm

Facebook redirect_uri is required

Hi

I get the same error when trying to connect (login with FB)....

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

Facebook redirect_uri is required

Could you please share the app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a?

Grace Yip
Posts: 0
Joined: Wed Sep 11, 2013 7:47 pm

Facebook redirect_uri is required

ok i shared the project

Return to “Issues”