java - JSF+Facebook Integration One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL -


i have created facebook application , details given screen shot !

enter image description here

enter image description here

enter image description here

but when clicking on jsf button login facebook getting below exception

given url not allowed application configuration.: 1 or more of given urls not allowed app's settings. must match website url or canvas url, or domain must subdomain of 1 of app's domains.

here code using redirect

private void redirect(string url, httpservletresponse response)             throws ioexception {          string urlsessionid = response.encoderedirecturl(url);         response.sendredirect(urlsessionid);      } 

i tried other solution provided in other question found in stackoverflow not worked me .

if (requesturl.indexof("login.xhtml") > 0) {             callback = requesturl.replaceall("login.xhtml", "fblogin.xhtml");         } else if (requesturl.indexof("userregistration.xhtml") > 0) {             callback = requesturl.replaceall("userregistration.xhtml",                     "fblogin.xhtml");         }         service = new servicebuilder().provider(facebookapi.class)                 .apikey(apikey).apisecret(apisecret).callback(callback)                 .scope("email,offline_access").build(); 

i made changes in application , worked user created application not other user

enter image description here


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -