Hi, I am trying to create a small facebook app and associate it to a fan page in a tab. I am trying to include an external javascript file in my page and call a method on a button click event.
Below is a part of the code
<script language="Javascript" src="http://mysite.com/fb.js"></script>
<input type="button" value="Click....." onClick="javascript:showDialog();" />
content of fb.js is as below
function showDialog() {
new Dialog().showMessage('Dialog', 'Button clickeed');
}
When I load the tab in my fan page, it shows an error "Cannot allow external script", whereas when I load the canvas url [http://apps.facebook.com/...] directly and click on the button, it works [shows the dialog].
Does script include works only on the canvas and not on the profile page?
I have another question though Initially I had the script src as a relative path but it errored out with the same error - "Cannot allow external script". Can't I use relative path for the external scripts?