javascript - Use multiple canvas URLs in one Facebook app -


i trying host web app on different domains. receive errors like:

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.

however seems can set 1 canvas url , secure canvas url in facebook settings page. possible host web app on different domains? thank much!

if can host single php file (although doesn't contain php @ all, javascript) on ssl host can it. wrote blog post on how did using 2 app sharing same canvas url.

a ssl host mandatory work. shared certificates work.

short story long in index.php file need to:

var urlstring=document.referrer;  var pagenamen = "?p="; //this specific first application  var pagenamez = "?url=";// specific second application   var indexn = urlstring.indexof(pagenamen);// , index.  var indexz = urlstring.indexof(pagenamez);// , index.   if(indexn != -1){   var resn = urlstring.substring(indexn);   location.href = "https://first_application_url/"+resn; }  else {   if(indexz != -1){     var resz = urlstring.substring(indexz);     location.href = "https://second_application_url"+resz; }  }  

you catch request , split depending on requesting url.

in post find index.php file used in case can download, too.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -