Welcome Developers!

in

Welcome!

in

TwitterSpace boooooooooyyyyy!

Last post 01-22-2008 12:34 AM by Robbie Coleman. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 01-17-2008 8:34 PM

    TwitterSpace boooooooooyyyyy!

    Yup! Now that Mr. Max has let the cat outta the bag on making external requests, I have finally hooked up my (very basic so far) first Twitter app.

    Go'head... check it out:
    http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=31517887

    And here is the app profile:
    http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=314047011

    No use any of you installing it unless you want to show my twitter updates on your page.

    ;-} 

  • 01-17-2008 8:47 PM In reply to

    Re: TwitterSpace boooooooooyyyyy!

    well... looks like I really do suck at Web UI.

    My tweet dates show-up like this in IE:
    NaN/NaN/NaN NaN:NaN:NaN PM

    and fine in Firefox:
    1/16/2008 9:22:47 PM 

    ideas anyone...? 

  • 01-18-2008 1:27 PM In reply to

    Re: TwitterSpace boooooooooyyyyy!

    So we can install this app to keep track of Robbie's status...lol. 

  • 01-20-2008 6:49 PM In reply to

    • Allen
    • Top 200 Contributor
    • Joined on 12-26-2007
    • Posts 25

    Re: TwitterSpace boooooooooyyyyy!

    Can you make it work on Viewer - so I can stalk myself?

    Allen

  • 01-21-2008 10:34 PM In reply to

    Re: TwitterSpace boooooooooyyyyy!

    of course!

    it just doesn't have any persistance to store user settings like Twitter screen name and all yet.

    once i get that all wired up, the plan is for the canvas version to be a widget management app and give a user access to common twitter tasks, and for the profile view to be one of 3 different feed views set by the user.

  • 01-22-2008 12:34 AM In reply to

    Re: TwitterSpace boooooooooyyyyy!

    robbiecoleman:

    well... looks like I really do suck at Web UI.

    My tweet dates show-up like this in IE:
    NaN/NaN/NaN NaN:NaN:NaN PM

    and fine in Firefox:
    1/16/2008 9:22:47 PM 

    ideas anyone...? 

     

    finally figured it out.

    twitter uses a date format like: "Tue Jan 22 08:24:03 +0000 2008"

    and IE needs this: "Tue Jan 22 2008 08:24:03 +0000"

    to parse my local time of: 1/22/2008 12:24 AM

    so... my jankey little javascript to parse and re-format twitter status.created_at values looks like this:

    // where 'dateStr' is a twitter status.created_at
    // and 'sb' is a Sys.StringBuilder
    function FormatAndAppendDate(dateStr, sb) {
        // twitter: Tue Jan 22 02:34:33 +0000 2008
        //      IE: Tue Jan 22 2008 02:34:33 +0000
        var yearStr = dateStr.substr(dateStr.length - 4, 4);
        var preDateStr = dateStr.substr(0, 20);
        var dateStrFixed = preDateStr + yearStr + " +0000";
       
        var postDate = new Date(dateStrFixed);
       
        var curr_month = postDate.getMonth();
        curr_month++;
       
        var a_p = '';
        var curr_hour = postDate.getHours();
       
        if (curr_hour < 12)
           a_p = 'AM';
        else
           a_p = 'PM';
        if (curr_hour == 0)
           curr_hour = 12;
        if (curr_hour > 12)
           curr_hour = curr_hour - 12;
       
        var curr_min = postDate.getMinutes();
        curr_min = curr_min + '';

        if (curr_min.length == 1)
            curr_min = "0" + curr_min;
       
        var curr_sec = postDate.getSeconds();
        curr_sec = curr_sec + '';

        if (curr_sec.length == 1)
            curr_sec = "0" + curr_sec;

        sb.append(curr_month);
        sb.append('/');
        sb.append(postDate.getDate());
        sb.append('/');
        sb.append(postDate.getFullYear());
        sb.append(' ');
        sb.append(curr_hour);
        sb.append(':');
        sb.append(curr_min);
        sb.append(':');
        sb.append(curr_sec);
        sb.append(' ');
        sb.append(a_p);
    }

Page 1 of 1 (6 items)