Title: [Plugin: WP Facebook Like] xfbml javascript embedding mode produces invalid HTML
Last modified: August 19, 2016

---

# [Plugin: WP Facebook Like] xfbml javascript embedding mode produces invalid HTML

 *  [monodistortion](https://wordpress.org/support/users/monodistortion/)
 * (@monodistortion)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-wp-facebook-like-xfbml-javascript-embedding-mode-produces-invalid-html/)
 * Version 1.4.0
 * In the xfbml javascript embedding mode the function `get_footer()` is added to`
   loop_start`. This puts `<div id='fb-root'></div>` in the `<head>` section. Also
   JavaScript needs to be in the tag `<script type='text/javascript'>` to be valid.
 * I ended up changing line 82 from:
 *     ```
       add_action('loop_start', array(&$this, 'get_footer'));
       ```
   
 * to
 *     ```
       add_filter( 'wp_footer', array( &$this, 'get_footer' ) );
       ```
   
 * The `<fb:like>` is also invalid but this isn’t as big a problem.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [monodistortion](https://wordpress.org/support/users/monodistortion/)
 * (@monodistortion)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-wp-facebook-like-xfbml-javascript-embedding-mode-produces-invalid-html/#post-1885419)
 * Using iframe mode the attribute `allowTransparency` is invalid but it’s used 
   for IE.
 *  [cucupan](https://wordpress.org/support/users/cucupan/)
 * (@cucupan)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-facebook-like-xfbml-javascript-embedding-mode-produces-invalid-html/#post-1885844)
 * thank you so much!! ^_^
 * i was messing with this thing for almost an hour to get it right.
 * and i only noticed it did that when i was trying to add `og:image` to my header
   and it wasn’t working using [URL Linter](http://developers.facebook.com/tools/lint).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: WP Facebook Like] xfbml javascript embedding mode produces invalid
HTML’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-facebook-like.svg)
 * [WP Facebook Like](https://wordpress.org/plugins/wp-facebook-like/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-facebook-like/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-facebook-like/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-facebook-like/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-facebook-like/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-facebook-like/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [cucupan](https://wordpress.org/support/users/cucupan/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-facebook-like-xfbml-javascript-embedding-mode-produces-invalid-html/#post-1885844)
 * Status: not resolved