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 3618734
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:47:26+00:00 2026-05-18T22:47:26+00:00

I’m trying to create a Facebook application that displays a friend invite dialog within

  • 0

I’m trying to create a Facebook application that displays a friend invite dialog within the application using Facebook’s Javascript API (FB.ui).

To do that I followed this tutorial

I have two problems:

  1. The action url I’ve put in the request-form is “http://apps.facebook.com/appname/post_invite.php”
    but I see that the iframe source after the post is “http://example.com/post_invite.php”
    and when this iframe tries to do:
    parent.closeInviteWidget();
    I get an error saying:

    “Permission denied for < http://example.com > (document.domain has not been set) to get property Window.closeInviteWidget from < http://apps.facebook.com> (document.domain=< http://facebook.com>).”

  2. The skip button inside the request-form opens the action url in a new window (new browser tab) and not post to itself like the invite button.

How can I fix those problems?

——————– UPDATE : ——————————–

I’ve tried to do what ifaour said and changed the code to:

function inviteFriends(user_name, category_id, category_name)
{
    url = appBaseUrl + "/index.php?category_id=" + category_id;
    req = "<fb:req-choice url='" + url + "' label='Authorize My Application' />";
    content = user_name + " opened a new category called " + category_name + ". " + req;
    action = 'post_invite.php';

    fbmi_text = '<fb:request-form action="' + action + '" target="_self" method="post" invite="true" type="Invite" content="' + content + '" <fb:multi-friend-selector showborder="false" actiontext="Invite yor friends" email_invite="false" import_external_friends="false" /> </fb:request-form>';

    FB.ui({
    method:'fbml.dialog',
    width:'750px',
    fbml:fbmi_text
     });
}

When I use FireBug and look at the invite form it looks like this:

<form id="req_form_4d20682f73ddb6e71722794" content="I've opened a new category called dsfsd. <fb:req-choice url='http://apps.facebook.com/appname/index.php?category_id=60' label='Authorize My Application' /> type="Invite" invite="true" method="post" target="_self" action="http://apps.facebook.com/appname/post_invite.php">
...
</form>

But I still get the same error:

Permission denied for http://example.com (document.domain has not been set) to get property Window.closeInviteWidget from http://apps.facebook.com (document.domain=http://facebook.com)…

This are my app settings (I’ve added spaces because I can’t add more links):
Site URL : http://appname.example.com/
Canvas Page : http://apps.facebook.com/appname/
Canvas URL : http://appname.example.com/
Canvas FBML/iframe : iframe
Post-Authorize Redirect URL : http://apps.facebook.com/appname/

  • 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-18T22:47:27+00:00Added an answer on May 18, 2026 at 10:47 pm

    Please have a read of the official Facebook document.

    Also try using action="http://appname.mydomain.com/post_invite.php".

    EDIT: I’ve just realized! are you using IFrame or FBML as canvas type?!
    If you are using IFrame then fb:serverFbml is needed to use FBML within your IFrame.

    Also please note that FBML will be deprecated:

    We are in the process of deprecating
    FBML. If you are building a new
    application on Facebook.com, please
    implement your application using HTML,
    JavaScript and CSS. You can use our
    JavaScript SDK and Social Plugins to
    embedded many of the same social
    features available in FBML. While
    there is still functionality that we
    have not ported over yet, we are no
    longer adding new features to FBML.

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

Sidebar

Related Questions

I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am reading a book about Javascript and jQuery and using one of the
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm making a simple page using Google Maps API 3. My first. One marker
I am trying to understand how to use SyndicationItem to display feed which is
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.