How To Link To Other Tabs or Sections in Facebook using iFrames Custom Facebook Page
Facebook has switched over to iFrames for Custom Facebook Pages, and with this switch, developers have been experimenting with new functionality across pages. Naturally, with such a big change, there are some bugs/nuances that need to be discovered. While working on a custom Facebook Page for a client, I ran into this situation.
We wanted to have multiple customizations on the page, each on it’s own Tab (I know they’re not tabs anymore, but for lack of a better word, we’ll stick with calling them Tabs). In Static FBML, if we wanted to link two custom tabs together, we’d just grab the URL and create an HTML link. This won’t work with iFrames, due to the way Facebook displays the links. By default, links will open up inside the iFrame and when using this trick to remove scrollbars from Custom Facebook Page iFrame, the links will not display correctly. Instead, the content in the iFrame will reload to show you a blue Facebook image that then links to the original link you had. This of course adds an unncessary middle-step that breaks the flow of your page.
To correct this, simply define the target of the link, as follows:
(a href=”http://www.facebook.com/pages/YOUR_LINK_HERE” target=”_top”)Link Text(/a)
(replace parenthesis with <>)
That’s it! The link will now work as it should.











Annukka
March 21, 2011
Almost drove me crazy. Thank you very much for this solution .)
Rick Hendershot
March 31, 2011
Thanks a lot. So simple, but so frustrating if you don’t know the solution.
William
April 7, 2011
Much appreciated, thankyou!
Jeff
July 27, 2011
Thanks so much!!
Mikkel
July 29, 2011
So it woul look like this:
(a href=”http://www.facebook.com/pages/http://www.facebook.com/MY_PAGE.com” target=”_top”)Link Text(/a)
Because it doesn’t work for me
Waqas
August 15, 2011
Thanks Buddy
Zoey
August 22, 2011
Lifesaver! You’re a legend.
thanks so much for posting
Jay Kay
November 3, 2011
Thanks for the tip! I was having to put a _blank instead which wasn’t very elegant.
J2
November 6, 2011
It worked!!! Thank you, thank you, thank you…this was driving me crazy!
Kera
November 10, 2011
How would this work if linking from images?
I tried the same thing in my image link and it wouldn’t link at all.
I’m not very well versed in html or javascript so could someone suggest why this hasn’t worked and how I can make it work?
thanks
Sam Lyons
December 16, 2011
Thank You for being amazing