Search code examples
ruby-on-railsfacebooker

how can i add fb_multi_friend_selector, Facebooker2


Hi i want to add to my app multi-friend-selector. I found a method in helpers: fb_multi_friend_selector.

Am i supposed to do just:

 <%= fb_multi_friend_selector("Test message") %>    

Because it is not working for me. My user is authenticated in my app. I can see all of my fb friends names(with current_facebook_user.friends)...etc. So i am logged in. And i have the permission :perms => 'publish_stream'.

What should i do to get fb_multi_friend_selector working? I am using rails 2.3.5. And facebooker2 with mogli gem. Thank you very much for any answers!


Solution

  • Try sticking this in your view:

        <fb:serverFbml>
            <script type="text/fbml">
                <fb:fbml>
                    <fb:request-form
                        method='POST'
                        type='an invitation to do this.'
                        content='I invite you to do this.  
                            <fb:req-choice url="http://apps.facebook.com/smiley/yes.php" label="Yes" />
                            <fb:req-choice url="http://apps.facebook.com/smiley/no.php" label="No" />'
                        <fb:multi-friend-selector actiontext="I invite you to do this.">
                    </fb:request-form>
                </fb:fbml>
            </script>
        </fb:serverFbml>