Oh my god. It's full of code!

Rss Feed to Salesforce Chatter Challenge

So I hadn’t really planned on doing any more challenges for a bit seeing as I’m going on a vacation (yay camping!) soon but I was bored today without a whole lot going on so I figured why not try and do one quick. Thankfully there was this cool little challenge to be able to consume an RSS feed and post new entries to a chatter group.

I’ve never used RSS before (I’m a techie who isn’t very techy I guess) but I knew of it. So I did a bit of reading and was… ambivilent about finding that it’s basically just XML. The hardest part of this was building the XML parser and dealing with the stupid date format. I really dislike the inflexibility of Apex date functions. This is one arena they could learn a thing or two about from ColdFusion. I swear I could give Coldfusion “2008,/21bannana/03 05:1:52PM” and it could make a date out of it. Anyway I digress. This was a fun little challenge and a good way to pass the afternoon. Dunno if I’ll win or not (I could see how I could make some upgrades; allow syncing of only 1 feed at a time, a drop down menu or lookup thing for the chatter group instead of requiring an ID) but I am kind of tired of coding for now 😛 Anyway, here is the video.

RSS To Chatter

3 responses

  1. Thanks for sharing Daniel. This is cool. How hard would it be to port this to feed into an Account’s Chatter Feed?

    August 12, 2011 at 9:24 pm

    • Kevin,
      Actually I haven’t tested but I think you could do that with this right now. That field that says chatter group id, really is just a parentId. You could put damn near any Id in that field and it should work for posting to that objects feed. Let me give it a whack and I’ll let you know how it goes XD

      August 12, 2011 at 9:29 pm

    • Yup, I was right. You can put any object ID in the field id and it runs. So it’s actually even more versatile than I thought. If it has a chatter feed on it, it’s a valid target for this app.

      August 12, 2011 at 9:32 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s