CodeBlink.com Open Source Projects, Code, Rants, and other miscellany

29May/103

Make your own Google Buzz feed widget with HTML and JavaScript

The Google Buzz API was released in Labs recently and I felt like distracting myself with some fun. In a matter of 2 hours I had my own little Buzz feed widget going. Here's the code I'm currently testing with:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<h2>My Buzz Feed</h2>
<ul id="content"></ul>
<script type="text/javascript">
function handleResponse(response) {
        for (var i = 0; i < response.data.items.length; i++) {
        var item = response.data.items[i];
         
         if (item.verbs=='post') {
             var verbed = 'posted';
         } else if (item.verbs=='share') {
            var verbed = 'shared';
         } else {
             var verbed = item.verbs;
         }
         
         document.getElementById("content").innerHTML += '<li>';
          if (item.actor.profileUrl) document.getElementById("content").innerHTML += '<a href="' + item.actor.profileUrl + '"><img src=' + item.actor.thumbnailUrl + ' border="0" height="20" width="20" alt="Jason Rundell profile picture" /></a>';
          document.getElementById("content").innerHTML += '<img src="http://www.codeblink.com/images/buzz.png" height="20" width="20" alt="Buzz icon" /> On ' + item.updated.substring(0,10) + ', I ' + verbed + ':<br />';
          if (item.object.content) document.getElementById("content").innerHTML += item.object.content;
          if (item.object.attachments && item.object.attachments[0].links.preview) document.getElementById("content").innerHTML += '<br /><img src=' + item.object.attachments[0].links.preview[0].href + ' alt="' + item.object.attachments[0].type + '" />';
        }
      }
    </script>
    <script src="https://www.googleapis.com/buzz/v1/activities/jasonrundell/@public?alt=json&callback=handleResponse"></script>

View the working demo HERE.

Just make sure to change '/jasonrundell/' on line 23 with '/[your buzz name]' and you'll have a widget that will display your public Buzzes on any page.

Aside from the several object properties I'm using in this example widget, there are many more available to you to use and manipulate. Let me know what you come up with ;)

  • Share/Bookmark
20May/100

Copy and Paste Development with Google Web Elements

I half watched and half listened to the  the Day 1 keynote videos of Google I/O today and among the plethora of new and exciting features discussed was Google Web Elements.

Most of us have already used the copy and paste embed code for Google Maps and YouTube, but I think we should start paying more f attention to the other web elements listed currently on the Google web elements site. How can we best utlize them? The Checkout and Wave (now that Wave is public) elements look especially interesting to me.

Do you have projects that could use some Googleizing?

  • Share/Bookmark
16Mar/100

Why is Google Buzz like a kitchen sink?

Alice in Wonderland's Mad Hatter standing behind a mushroom and asking with a text bubble: Why is Google Buzz like a kitchen sink?

Alice in Wonderland's Mad Hatter wonders why Google Buzz is like a kitchen sink. He's soooooo done with ravens!

Do you use Google Buzz? Do you follow Mashable.com on Google Buzz? Then the following idea I sent via email to bizdev@ might be of interest you.

Dear Mashable,

To start, I'd just like to say that this is an idea for you to use and not a business proposal. Now onto the idea :)

I've been following @Mashable on Google Buzz since the 2nd week Buzz launched. I like your approach to it but I have been noticing a lot of comments in Buzz from people who have preferences as to what content they would like to see from you. Also, I've read a lot of comments in back channels about how your updates take up so much page space in their Buzz feed every day (this is a common problem shared among other Businesses/Celebrities who Buzz).

I would like to suggest the following idea to you:

Why not create multiple Buzz streams that deliver specific content? It's an an idea very similar to how you can create Twitter lists. Examples of Buzz streams you could set up:

@MashableSocialMedia - Buzz articles that appear on http://mashable.com/social-media/
@MashableMobile - Buzz articles that appear on http://mashable.com/mobile/
@MashableVideo - Buzz articles that appear on http://mashable.com/video/
@MashableAndroid - More granular than @MashableMobile, Buzz only articles that are related to Android
@MashableiPad - More granular than http://mashable.com/apple/, Buzz only articles that are related to Apple's iPad

... etc etc etc.

I think readers would really enjoy being able to choose the content they consume in Buzz.

With your @Mashable Buzz account, you can create a digest of what's being published in these channels. And when new articles are added through out the day, you can just Edit the original daily digest Buzz.

As for posting your periodic questions to users, why not post those within the related Buzz channels? I theorize with the content specific Buzz feeds you will have less of a "throw it at the masses and see what sticks" effect and instead have a higher percentage of quality conversations.

Personally, I can deal with muting the @Mashable topics I'm done with reading or have no interest in, and I have the patience to manage my Buzz stream when it fills up. However, take some time to think about the possible negative effects of 'Muting'. I never Mute the Buzzes from friends - only from Mashable and news sources. Not muting is sort of like Bookmarking in Buzz. If I don't mute it I can go back at any time using search to retrieve the Buzz.

Thanks for taking the time to read my email :)

Cheers,

Jason Rundell

I'd really like to see this idea to be adopted by them, so please let them know and maybe they will listen :)

  • Share/Bookmark