Question

Hey guys, I have developed a small site that i would like to embed into a tab on a facebook page.

Previously I used this code to load in an iframe, it worked great:

        <a onClick="outside_location.setInnerFBML(link_1);" style="cursor: pointer;">Link 1</a> | <a class="red" onClick="outside_location.setInnerFBML(link_2);" style="cursor: pointer;">Link 2</a>

    <div id="outside_location"></div>
    <fb:js-string var="link_1"><fb:iframe width="760" height="1280" frameborder='0' src='http://www.WebWhispers.in' /></fb:js-string>
    <fb:js-string var="link_2"><fb:iframe width="760" height="1280" frameborder='0' src='http://google.com/' /></fb:js-string>

    <script type="text/javascript" charset="utf-8">
    var outside_location = d

document.getElementById('outside_location');
</script>

However, it has stopped working. I dont think facebook allows iframe inside of pages, only applications.

How can I load this page in without learning FBML? The site uses Jquery so I cant use FBML anyway.

I know applications can use iFrames, can I make it an application and then embed the application into a page tab somehow?

Was it helpful?

Solution

No. Tab pages can not contain iFrames. They must be written using FBML and FBJS.

One reason for this is that Facebook does not want to enable Tab pages to detect who looks at them. All requests (including images) on tab pages are proxied through Facebook for this reason. If iframes were allowed then the application would be able to detect who looked at it, which would present a privacy issue for Facebook users.

OTHER TIPS

This is either a policy change by Facebook or, more likely, a bug. I say it's unlikely to be a policy change as it throws a script error, whereas a policy change would more likely strip the code out before it's rendered.

There's a bug report you can add votes to and follow here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top