Facebook like plugin not css validator compatible
I am using facebook Like plugin on my forum. Its working perfect but when I validate my website pages with http://validator.w3.org it gives lot of css errors with facebook like button markup.
Isn’t there any version of this like button which is css validator compatible? I am validating my website because I want to make it search engine friendly.
Any advice in this regard will be highly appreciated.
You might want to take it up with the plugin author.
I don’t think it’s the CSS that’s giving the errors though.
The author has used <iframe> tags in the plugin. On validating page that contains facebook like button, shows following markup error:
1) element “iframe” undefined
…0px;align:left;margin:10px 0px 0px 0px”></iframe><div id=”ajax-response”></div>
2) there is no attribute “style”
3) there is no attribute “src”
The code rendered in browser for this button is as follows
<iframe src=”http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.thecollegehunt.com%2Ftopic%2Fsupport-ipl&layout=standard&show_faces=false&width=450&action=like&colorscheme=light&font=arial” style=”border:none;overflow:hidden;width:450px;height:30px;align:left;margin:10px 0px 0px 0px”></iframe>
Hope author of this plugin “Gautam” (if I am not wrong) is reading this post.
Facebook for Websites: Social Plugins for Your Blog and Business
Facebook offers webmasters and bloggers a lot of options for integrating their platform onto websites. Consider the number of users that are logging into Facebook on a daily basis and staying logged in throughout the day while perusing the Internet.
facebook for webistes infographic
It makes sense that website owners would want to take advantage of the power of Facebook on their own sites, especially since Facebook is the most used identity when it comes to people signing into sites, as shown in the infographic above.
The best part is that Facebook offers several social plugins that you can implement onto virtually any website, some with very little coding knowledge required. Let’s look at these plugins, and the reason why you would want to have a few of them on your site.
The Like Button is probably the most well known and recognized of the Facebook social plugins. Like buttons can be placed on any page of your website and can be targeted to like the page that the button is on, or a URL that you specify. For example, you can have a Like button on every page of your site that, when clicked, will create a Like to your homepage.
To get the code for the Like Button, simply visit the developer’s page, enter the URL you want visitors to like and then customize the other features such as layout style, showing faces of people who have liked it, width, wording (Like or Recommend), font, and color then get the code.
If you want to incorporate the Like Button on a WordPress theme (say in your single post templates to work with each of your posts), you can use the following code in place of the URL:
<iframe src=”http://www.facebook.com/plugins/like.php?href=<?php echo rawurlencode(get_permalink()); ?>&layout=button_count&show_faces=false&width=100&action=like&font=verdana&colorscheme=light&height=21″ scrolling=”no” frameborder=”0″ style=”border:none; overflow:hidden; width:100px; height:21px;” allowTransparency=”true”></iframe>
- You must be logged in to reply to this topic.