Facebook fb:multifriendselector in iFrame

August 19, 2010

Just a quick post to try and help people who are having trouble with the Facebook multi-friend-selector in an Iframe. It took my ages to figure out how to get it not be cut off using the new Javascript SDK.

As you know you need to use the fb:serverFbml tag in order to display an fb:multifriendselector on your page, but the facebook developers documentation is misleading as to how to set the width of the fb:serverFbml frame.

The Facebook developer documentation says to display it like so:

<fb:serverFbml style="width: 755px;">  
     <script type="text/fbml">
        <fb:fbml>
            <fb:request-form
                action="<URL for post invite action, see fb:request-form docs for details>"
                method="POST"
                invite="true"
                type="XFBML"
                content="This is a test invitation from XFBML test app
                <fb:req-choice url="see fb:req-choice docs for details."
                    label="Ignore the Facebook test app!" />
             ">
             </fb:request-form>
                <fb:multi-friend-selector
                    showborder="false"
                    actiontext="Invite your friends to use Facebook." />
         </fb:fbml>
    </script>
</fb:serverFbml>

The key mistake is in the line

 <fb:serverFbml style="width: 755px;">

Browsers seems to ignore the style attribute completely! Instead you need to use:

<fb:serverFbml width= "755">

This works correctly and causes the popup that is displayed when you click “Send Invitation” to display WITHIN the frame.

Hope this helps someone else! Any queries just ask in the comments and I will clarify/add to this post

1

Collision Textures and 2DRenderTargets in XNA

December 28, 2008

I started making a Tower Defense Game which I will be sharing soon, including all my trials and tribulations and the theory behind it. Whilst making it I came across an interesting problem, which was how to tell whether or not the user could place the tower where they currently have the cursor. I thought about it for a while and then decided that the best method would be a sort of collision texture whereby you have a texture ‘underneath’ the main texture which outlines the areas where a tower can and cannot be placed (thought this texture is never actually rendered).

(more…)

2

Restore Windows XP Theme (Luna Theme)

December 22, 2008

Thought I’d post a quick entry on how to restore your Windows XP theme if it goes awry. I recently just fixed my sister’s computer by removing a ton of Malware and Viruses from it, and after I was done the Windows XP theme changed to the classic theme. I went to change it back in Window’s Display Properties, but to my chargrin it wasn’t even listed as an option! So after much tinkering around and comparing of her PC to laptop, I realized the theme must be corrupted.

(more…)

0