Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 920957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:48:01+00:00 2026-05-15T18:48:01+00:00

We currently have an iframe-based Facebook canvas application in the works. The canvas portion

  • 0

We currently have an iframe-based Facebook canvas application in the works. The canvas portion is working fine and doesn’t really touch the Facebook API at all, since we don’t really need any permissions from users in terms of accessing their social graph; the data we’re using comes entirely from outside of Facebook.

What we would like to do is allow users to add an FBML version of our app to their profiles as a tab. However, it isn’t clear how we are supposed to go about enabling that functionality using the current Facebook APIs.

The canvas page and callback settings are set up and working correctly, and we currently have a tab name and URL set up in our Application Settings (and hitting the tab URL directly will load our minimal test page), but there’s no obvious way to offer users the ability to add this tab to their profiles.

Our initial thought was that we would need to add our own “Add Profile Tab” button in xfbml as mentioned at http://wiki.developers.facebook.com/index.php/Fb:add-profile-tab

But even when we reduce the iframe to something as barebones as

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
</head>
<body>
 <script src="http://static.ak.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US" type="text/javascript"></script>

 <fb:add-profile-tab></fb:add-profile-tab>

 <script type="text/javascript">
     FB.init("<our secret key>", "xd_receiver.htm");
 </script>
</body>
</html>

the xfbml element fails to render. Safari and Chrome both list the following error in the console: “Unsafe JavaScript attempt to access frame with URL [our app url on facebook] from frame with URL [URL our iframe loads from]. Domains, protocols and ports must match.”

We do have the Connect URL pointing at our app in the Connect tab of the application settings page. The xd_receiver.htm file is located in the same directory as the iframe page and its contents are

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<body>
<script src="http://static.ak.facebook.com/js/api_lib/v0.4/XdCommReceiver.js" type="text/javascript"></script>
</body>
</html>

which seems to be what all of the relevant documentation recommends. The browser is definitely loading it as verified through the relevant debugging panes (web inspector, firebug, etc).

So the question is, is this the proper way of going about adding “add to profile tab” functionality to our application? If so, how do we resolve the cross-domain error? If not, what should we be doing instead? The current documentation seems to focus heavily on the Graph and Authentication APIs, neither of which really mention profile tabs.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T18:48:01+00:00Added an answer on May 15, 2026 at 6:48 pm

    It turned out that <fb:add-profile-tab> simply doesn’t render without the user having first allowed the app to connect to them via something like <fb:login-button>

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently developing a facebook canvas (iframe) based application. Is there any way
I currently have an MS Access application that connects to a PostgreSQL database via
I currently have heavily multi-threaded server application, and I'm shopping around for a good
I currently have a functioning in-house Windows Forms application which extensively uses the DataGridView
I currently have a DetailsView in ASP.NET that gets data from the database based
Iam trying to build an Facebook Application based on PHP. The Application is running
Current Project Setup I've been working on a web-based chat, similar to Facebook chat.
I have built an completely AJAX based application which has no page refresh and
I'm currently trying to have an iframe fit the size of my screen, and
I have currently installed prettyphoto and managed to launch an iframe on page load

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.