Search code examples
facebookfacebook-social-plugins

Custom styling on Facebook's LikeBox plugin - is it possible?


I would like to ask - is it possible to apply my custom CSS into the LikeBox code? I would like it to appear just as on www.autentika.pl. Does it matter whether it is an IFrame, XFBML, or simply HTML? Thank you.


Solution

  • Look at this site: multipla.tv This is done here also. You should add the old version of fan the box:

    <fb:fan profile_id="106908749418612" stream="" connections="14" width="696" height="113" css="http://multipla.tv/css/facebook.css?3159"></fb:fan>
    

    to you website and include js file:

    http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/pl_PL
    

    Just before ending html tag insert code given by facebook after generating fb likebox:

    <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-27010550-1']);
      _gaq.push(['_trackPageview']);
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();
    </script>
    

    Remember to change the setAccount for yours. And one more think. In head you should insert:

    <script type="text/javascript">FB.init("j4eb6a5dd7554377955544101");</script>
    

    The argument of init is your id. You can find it when you search the javascript included in the iframe of a normal fb likebox.