[Facebook iFrame Tab] Invite friends to Fanpage

Discussion in 'Facebook' started by wdekreij, Mar 17, 2011.

  1. #1
    Hi all!

    I created an iFrame application which I use as a tab in my FB fanpage. On that page, I'm trying to have an "invite friends" feature so that users can invite their friends to watch the fanpage!

    Currently I'm using this code:

    <div id="fb-root"></div>
    
    <script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>
    <script type="text/javascript">
    FB.init({
    appId  : 'xxx',
    status : true, // check login status
    cookie : true, // enable cookies to allow the server to access the session
    xfbml  : true  // parse XFBML
    });
    </script>
    
    
    <fb:serverFbml>
    <script type="text/fbml">
    <fb:request-form
    action="URL of fanpage (e.g. http://www.facebook.com/fanpage)"
    target="_top"
    method="POST"
    invite="false"
    type="lipsum"
    content="<fb:req-choice url='URL of fanpage' label='Accept' />"
    >
    
    <fb:multi-friend-selector
    showborder="false"
    actiontext="Lorem Lipsum"
    cols="3"
    rows="5">
    </fb:request-form>
    </script>
    </fb:serverFbml>        
    
    </div>
    Code (markup):
    With this code, there are two main problems:

    When hitting "skip" or after sending out invites, an empty Facebook pages (or sometimes with the FB logo) appears.

    The invite that is send out is to the application (e.g. http://apps.facebook.com/application-name/) instead of to the fanpage (e.g. www.facebook.com/fanpage/). In other words, there is no "Like" button whatsoever, nor can they see anything from the fanpage itself..

    Any suggestions on how to work these two things out?

    Thanks in advance!
     
    wdekreij, Mar 17, 2011 IP