Forums

WPBook: not able to show up FBML code. (4 posts)

  1. alessandroavenali
    Member
    Posted 1 year ago #

    Hi.
    I'm trying to show some FBML code in my app, but it's not working.
    Something like:

    <fb:tabs>
        <fb:tab-item href="# title="xxx" />
        <fb:tab-item href="# title="xxx" />
    </fb:tabs>

    I tryined this: http://mahmudahsan.wordpress.com/2008/11/22/facebook-fbml-rendering-in-iframe-application/
    But it doesn't work.

    How to?

  2. BandonRandon
    Member
    Posted 1 year ago #

    Where are you wanting to put the FBML? We only use FBML for invite friends, profile tabs, and posting to profile. With profile tabs and invite friends we set the url to index.php?is=ACTION&FBML=true or something similar to force the app to use FBML for that section. The article you posted is interesting but not sure it the method works with php applications.

    If you provide more info on what you'd like to do I can try to help

  3. alessandroavenali
    Member
    Posted 1 year ago #

    Well... I'm trying to render some tabs in my PHP application to jump to different blog categories.
    If you put my initial code into a FBML application you can see the result. I deleted my original online FBML application, so I cannot show you directly.
    This is the reference page for the <fb:tab> tag: http://developers.facebook.com/docs/reference/fbml/tab-item

    Here is my online IFRAME WPBook application, properly customized: http://apps.facebook.com/alessandroavenali/

    Thank you!

  4. johneckman
    Member
    Posted 1 year ago #

    Are you trying to add tabs inside your FB application canvas page?

    WPBook renders that page as an iFrame, which means it isn't using FBML on the canvas pages. (More accurately, there is javascript call which renders certain FBML after page load - see these lines in wpbook/theme/index.php, toward the bottom:

    <script type="text/javascript">
            FB_RequireFeatures(["XFBML"],function() {
              FB.Facebook.init('<?php echo $api_key; ?>',
                         '<?php echo $receiver_url; ?>',
                          null);
                FB.XFBML.parse(document.getElementById('addProfileButton'));
                               });
          </script>

    This takes the div with an id of 'addProfileButton' and parses the XFBML in it. You could probably do the same for any other div in which you want to put FBML, so long as it is part of what FB supports under the XFBML standard.

Topic Closed

This topic has been closed to new replies.

About this Topic