0

My FB app has been working fine and I hadn't made any changes in a while. All of a sudden, the Javascript has stopped working and i'm not sure why. Here is a simple example of what used to work but now doesn't;

<a href="#" onclick="unlink(); return false;">Unlink Account</a>

<script>

    function unlink() {
    var dialog = new Dialog();
    var url = "unlink_url";
    dialog.showChoice('Unlink Account', 'Are you sure you want to unlink this account from your myFlashStore account?' ,'Yes','No');

    dialog.onconfirm = function(){ document.setLocation(url); };
}

</script>

Very simple code that used to work. Now when I check the source of the page, everything within the <script> tag is commented out and I get this message;

Rendering the page using the following FBML retrieved from MY_URL You are seeing this because you are a developer of the application and this information may be useful to you in debugging. The FBML will not be shown to other users visiting this page. (dashes were replaced with underscores):

I don't understand why it has stopped working, can anyone help?

Wasim
  • 4,953
  • 10
  • 52
  • 87
  • are you sure you didn't violate any t&c? try creating a new (temp) app and see if the code works there - if it does it is most likely that Facebook has disabled your app because of some kind of t&c violation or user compains – scibuff Apr 05 '12 at 08:55
  • Not as far as I know. The app has been running for a while, I didn't get a notification about any violations. I will give it a go on another app. Is that the only reason why it wouldn't be working now? Surely they would just disable the whole app instead of just disabling JS? – Wasim Apr 05 '12 at 08:56
  • `FBML` is deprecated, it's not supported and no bugs will be fixed. And it will stop working in less than two months from now. It's time to move on! – Juicy Scripter Apr 05 '12 at 09:07
  • For FB to have any control with the js, this has to be FBML (and FBJS). As @JuicyScripter sais, FBJS is no longer supported, and FBML will be removed in not to long. – Sean Kinsey Apr 06 '12 at 04:36
  • @Wasim, according error message your application is rendered as FBML, check the settings to ensure. – Juicy Scripter Apr 06 '12 at 05:10

1 Answers1

1

Ok turns out that it was that my app wasn't an iFrame app, it was the old style FMBL app. Had to change it to an iFrame app and recode quite a bit of stuff and it all worked!

Wasim
  • 4,953
  • 10
  • 52
  • 87