Skip to content


Simple modification to FD Feedburner Plugin

Today for one of my sites, I needed to populate a Facebook page with a feed, but I didn’t want the entire post as the ‘note’. I found a great plugin called Feed Facebook, Leave Facebook that leaves a partial feed with a link to ‘leave Facebook’ to your site. This is EXACTLY what I needed, but I was having problem with my FD Feedburner Plugin which auto-magically converts my RSS feeds to feedburner feeds. In this particular case, I needed to exclude a single feed from this. Unfortunately, this is not a configuration option.

So I’m posting this mainly for myself in case there is a plugin update and I need to know how I did this the first time, but I can see that few might find this useful.

Basically in the feedburner_redirect() function, we need to add a conditional:

if ($feed_url != null) {
        // Redirect the feed
        header("Location: ".$feed_url);
        die;
}

Needs to be changed to this:

if ($feed_url != null) {
        // Redirect the feed
        if(!eregi(‘facebook’,$_SERVER[‘REQUEST_URI’])){
                header("Location: ".$feed_url);
                die;
        }
}

The feed url that Facebook will be using looks similar to this : http://www.yourdomain.com/feed?feedfacebook, if we detect this in the REQUEST_URI, we do nothing with the redirect. Now Facebook will be happy with our new feed, while any other requests to our site’s feed will be directed to Feedburner.



Related posts:

  1. Issues with CJNiche WordPress Plugin
  2. Including your WordPress blogs to a external website
  3. Simple script for connecting to Commission Junction’s Product Web Service and populating a local database
  4. Migrating Money-Code from Drupal to WordPress
  5. Understanding the Amazon Product Advertising API

Posted in Programming.

Tagged with , , , , , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.

Powered by WP Hashcash