Title: [Plugin: Facebook Comments for WordPress] RSS Feed doesn&#039;t validate:
Last modified: August 20, 2016

---

# [Plugin: Facebook Comments for WordPress] RSS Feed doesn't validate:

 *  Resolved [fpg](https://wordpress.org/support/users/fpg/)
 * (@fpg)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-facebook-comments-for-wordpress-rss-feed-doesnt-validate/)
 * Hey All,
 * I was trying to import my feed into HootSuite but I kept getting issues with 
   this plugin and trying to validate the feed. It wouldn’t return the comment number,
   so my RSS2 feed had a bunch of lines like this:
 * `<slash:comments></slash:comments>`
 * <slash:comments> must contain a positive integer in order to be valid, so I dove
   into the code, and found out the issue. Line 15 of the facebook-comments-combinecomments.
   php file:
 * `function fbComments_getProperCommentCount($fbCommentCount=0, $wpCommentCount
   =0) {`
 * The problem is, in many instances this function was being called with values 
   like empty strings. Because the values were being set, the default value wasn’t
   set and the empty string was returned.
 * Just add the following two lines at the beginning of the function and it will
   fix your RSS feed issues:
 *     ```
       function fbComments_getProperCommentCount($fbCommentCount=0, $wpCommentCount=0) {
       	if(!is_int($fbCommentCount) || $fbCommentCount < 0) $fbCommentCount=0;
       	if(!is_int($wpCommentCount) || $wpCommentCount < 0) $wpCommentCount=0;
       ```
   
 * Hope this helps! While this doesn’t fix the underlying problem, it will at least
   always return a 0 instead of nothing.
 * [http://wordpress.org/extend/plugins/facebook-comments-for-wordpress/](http://wordpress.org/extend/plugins/facebook-comments-for-wordpress/)

The topic ‘[Plugin: Facebook Comments for WordPress] RSS Feed doesn't validate:’
is closed to new replies.

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

 * 0 replies
 * 1 participant
 * Last reply from: [fpg](https://wordpress.org/support/users/fpg/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-facebook-comments-for-wordpress-rss-feed-doesnt-validate/)
 * Status: resolved