I have the Facebook Social Plugin (Like Box) in a site that I am building. A good portion of the visitors are behind corporate firewalls, and if their browsers detect a Facebook domain they will reject the call to the plugin.
I am using the Ajax prototype to make the calls to Facebook from my server which has no firewall that would prevent the Facebook call. However, when you call the Facebook plugins (irrespective of FBML/JS or iFrame version) it returns a bunch of new Javascripts and IFrames that make additional Facebook domain calls defeating the purpose. I built a version which nests two Ajax Calls with the hope that the I can force all the response to be executed on the Server, and just return the final rendered plugin to the browser. However, the first Ajax.Updater call simply returns what is in the HTML file not allowing it to execute. I don't know if Ajax.updater has the smarts to allow this to work, but I do have the evalscripts option set to true. What I have in mind is the following process: 1) Call the Ajax.Updater from the Index.html to a file named Loader.HTML 2) When the body onloads it will call another Ajax.Updater that makes a call to Facebook.HTML, which has the FBML to call the Facebook Plugin call. 3) The response from Facebook.HTML will load into Loader.HTML, which will execute all the iFrames and Javascript that is returning from Facebook 4) Finally the response in Loader.HTML will populate the browser with the rendered code. Can Ajax.Updater nest this way? I can't really tell what is happening on the server with my debugger, but either the Ajax.Updater is returning the contents of the Loader.HTML file without executing the nested onload, or it is not waiting for the nested onload to force the plugin to load in Loader.HTML. If I execute Loader.HTML it does call the FB plugin successfully. It seems the nesting is the problem. Any ideas? -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.