July 2007 – Stay N Alive

New “I’m Presenting” Badge

I was just given this badge to display on my blog to encourage everyone to register and come see me present at UTOSC. As mentioned earlier, I will be presenting at the Utah Open Source Conference, September 6-8, 2007 on development of Pligg Modules, and probably a little about Pligg itself. This conference gets bigger every year so reserve your tickets early! I hear Bruce Perens, author of the Open Source Definition will even be there. I’ve got a couple other presentations in the works as well (at other arenas), so stay tuned.

Facebook to Soon Allow Javascript?

First of all, it was excellent to meet and talk to everyone at the Utah Blogger Dinner on Thursday! I got to finally meet a few people, chatted a lot with many about Facebook, and was able to give a brief tutorial on Phil801’s laptop of the basics of setting up a Facebook app. I feel like I am becoming one of the local experts on the subject lately – maybe I should go into consulting! Phil801 also showed me some really cool stuff he is doing on The Daily Spike that he is working on. That is one incredible engine he has set up, and I really look forward to his official launch because it looks to be a very needed tool in the blogging world.

There’s some buzz in the Facebook Developer Forums (login required) lately about a new tag that seems to have crept up called fb:fbjs-string. It seems to require a variable called “var” passed to it, and appears to be some sort of sandbox currently for Facebook to possibly allow javascript within their developer API. This would definitely be a welcome addition, as the API currently, while still flexible, is rather limiting without much javascript support (with the exception of a few show/hide controls and limited ajax support). Here is the basic tag – when you type this in:

test

It translates to the following in the actual web page:

var a2353941073_test=new fbjs_fbml_string(‘test’)

I looked up fbjs_fbml_string(), and it just does this:

function fbjs_fbml_string(html){fbjs_private.get(this).htmlstring=html;}

I will have to sift through all of their javascript libraries to figure out what htmlstring does – anyone aware if this is easier done in Firebug? I am assuming that it is basically setting up a javascript object variable for you to access later, which through some other routine they will (or just haven’t made public yet) provide will allow you to do stuff with the text or javascript you passed to it. I need to investigate this further. If you find something I haven’t seen feel free to post it!

Are You a SteepAndCheap.com Fan? Try the “SAC App”

I just finished my second Facebook app (well, the first phase of it anyways). I’ve named it “The SAC App”. It conveniently checks SteepAndCheap.com for you and sends you an update on your feed when the item has changed. It also adds a little shopping cart onto your profile, which automatically adds the item to your SteepAndCheap shopping cart, ready for you to purchase. That shopping cart item also updates as the current steepandcheap item changes. I’ve got a ton of plans for this, and will definitely be expanding it in the future into other areas – keep watching! To add the app to your profile, go to:

http://www.facebook.com/apps/application.php?id=2414128633

Apple: I Told You So!

I said it before, the iPhone is going to be a mistake for Apple if they don’t do it right, and it looks like I was right! Evidently, (and Phil801 beat me to this – I was going to post it last night) AT&T was only able to activate 146,000 phones in the first 2 days it was for sale. Some are blaming it on AT&T’s poor service, others on just the lack of popularity and price factor of the iPhone. I personally think the market is just too saturated! Either way, I was right. Selling through just one carrier was a mistake, they have too much competition, and with a lack of business customers it will only de-value the great piece of the market the iPod had. The one thing the iPhone has done is brought to attention the fact that your cell phone can actually do the same things an iPod can do, and this will hurt both the iPhone and the iPod bottom line, as we’re starting to see. Time will only tell, and Apple is good at doing things right, or making things right that were wrong, but I have to say Apple’s just done this all wrong! I’ve used an iPhone already, but I will be waiting for v.2 or another phone before replacing my current options. I really like my MDA, to tell you the truth!

Facebook Gives Access to the Wall to Developers

I saw a pleasant announcement (facebook login required) from Facebook yesterday:

“Applications will very soon have the ability to attach arbitrary FBML content to a user’s wall, which will work in much the same way as attachments currently do for messages. The message action and callback URL for retrieving attachment content (specified on the application settings page) will now also be used to fetch content for a wall post. Refer to the documentation for details on how attachments work. Please note that the fb:message-preview tag will be renamed fb:attachment-preview and the old tag name will soon be deprecated.”

This opens up many possibility for Facebook application developers. Now, no longer does the user have to actually “install” the application to have it added to their profile. Now, you can have other users who have your application installed “post” your application to their friends’ wall for others to play with and use. To me, this is huge, as it allows an even more personal way for people to share their favorite apps with their friends.

One other use I can see for this is in a similar manner to that of the IRC bot. IRC bots sit on an IRC server and listen for particular words or phrases, or commands, and the bot responds appropriately with witty phrases and calculations. One could install this app and have it monitor their wall and post when particular things are said. Great – now I just gave out another business idea – just send me 10% of all your earnings. 🙂 (I really should just put a donation box on here for those that use my ideas)

GrandCentral Invites

GrandCentral just gave me 5 more invites. I think I figured out a good way to make this work. If you want an invite, comment below, and say “I want one”. Then, once you have received one, edit your comment and say “Got it!”. Your only responsibility for participating this and saying “I want one” is to give invites to at least 5 people above you (you get 10 invites). I will give out my remaining 4 to the first 4 that say “I want one” – don’t say it though unless you’re willing to give 5 of yours to the top 5 saying “I want one” in the list. Also, don’t forget to edit and say “Got it!” when you get your invites (or your bound to get spammed to death). Oh, and if you post this on Digg, Reddit, etc. give me fair warning so I can prepare for the traffic. 🙂

UPDATE: Since only I can see your e-mail addresses, it might help if you include some way for others to send you the invite. I’m not quite sure the safest way to do this – maybe just say “I want one”, followed by your e-mail address in “dot com” spelled format – or you could put your e-mail address in backwards, just choose a way spammers won’t be able to easily detect it, if you’re worried about that.

Google Analytics for Facebook Apps

Today, Facebook announced they were releasing a new FBML tag for developers that would allow developers of Facebook Apps to track their applications via Google Analytics. Before this, because the code you put on your page is javascript, there was no way to track your apps. I tried to install this, but ran into issues, in that Google tries to look at your main facebook app page for the javascript (which isn’t parsed by Facebook), while Facebook gives an error if you put the raw Javascript on the page. I came up with the below solution, which works like a beauty – you put your javascript between your tags, like this:

...

Since Google reads the plain callback url it won’t interpret the fb:google-analytics, and Facebook ignores everything between the tags. Works like a charm on mine.

GrandCentral Facebook App

Well, I took advantage of a low-hanging fruit, and wrote my first public Facebook app yesterday. My Picasaweb app is still in the works, but this appeared to be a bit more simple, as I would only have to deal with the Facebook API on this one, rather than the Google API as well. The concept is simple – you copy the code generated from your “Call Me” button generated from GrandCentral into a text box after you add the App to Facebook. The app then converts that embeded swf into FBML and sends it to your Facebook Profile for others to see.

The app itself wasn’t that hard once I got over the learning curve. The basics of the Facebook API are to generate a session key with canvas->validate_sig(), and then pull the session key parameter from the returned parameter hash to be passed through forms, used in a cookie, etc. Then on every page you need to access Facebook data (such as sending fbml to the user’s profile) you just run session_key(), passing in your session key you retrieved with validate_sig() on the entry page.

I also used this app as an opportunity to learn Perl’s Catalyst Framework, the Ruby on Rails of Perl. I will definitely be using this more in my web apps in the future – maybe even in some of my non-web apps (one advantage it has over RoR – it’s very flexible). The basics were I just run a simple command to create the basic Catalyst framework files and libs, then create my Database Model files and run a command to generate the libraries for that, including DBIx::Class ties. Then I just create my Controller libraries with a simple command, and then my TTSite (Template Toolkit libraries and files) libraries with another command. I’m then free to edit and write as I please, and it forces the code into a modularized structure. I used Perl’s WWW::Facebook::API libraries to access the Facebook API – once I figured out the session stuff everything else was very easy.

The one quirk I’m still trying to get around is Facebook forces you to click on an swf before it gets activated when it’s on a user’s Profile page. You’re supposed to be able to display an image in it’s place, but I’ve only been able to get that to work on the Canvas pages. The tag for that is , btw. I think I’m going to sniff httpd to see what that swf is doing behind the scenes to see if I can find a non-swf way of doing the call me button.

If anyone has issues in particular with either the GrandCentral App or WWW::Facebook::API, feel free to list your questions below. Also, please add my app and give comments! The url is:

http://www.facebook.com/apps/application.php?api_key=a5438e29c1b4df4ec650d374b4175741

Grand Central – Google’s Path to the Cell Phone Market?

Today I received an invitation to Grand Central, Google’s latest buyout that they announced recently. I had heard of it before, but Google’s buyout piqued my interest. I started the sign up process, where they let you pick an area code (any US area code is allowed), then they provided a list of phone numbers to choose from. After some additional information about myself, and a list of all my phone numbers, I was up and running!

This service is amazing! Phone and voice communications have finally been brought to the web with Grand Central. With Grand Central, I’m given 1 phone number. I can then use that phone number to, depending on who calls me, designate which of my home, work, or cell numbers those people get forwarded to, whether they get to talk to me personally, talk to my voice mail, or just get denied service. I can tell it to screen all blocked calls, or certain groups to force them to provide a voice name, which it will tell me when I answer the phone. It will use bayesian-type filtering to detect “spam calls” which you can tell it what to do with those.

I can also choose a custom tone that all or only specific users get. I chose a New York guy who talks to you as you’re waiting to talk to me – he patiently says to hold on, that I’m going to pick up soon. They also provide some other pretty funny ones. I can tell it to forward all my voice mail to my e-mail address, or cell phone (via text message), or both. They also provide me with an e-mail address (my phone number@grandcentral.com) that I can give to others that forwards to my personal e-mail.

The most powerful thing to this is the contact list. I imagine this will be tied to GMail’s contact list in the future, but you can set up contacts, and groups those contacts are assigned to. Integration with gmail is definitely going to happen. I can select any contact, click “call”, and it will dial my phone, then connect me with their phone. No longer do I ever have to tell others to change my phone number – one number, all the time, and it seemlesly points to all my other numbers.

I’ve said it before, but I really think this is just one more step towards Google entering the cell phone market. Google I am betting will some day sell cell phones with all this software on it. It will seamlessly integrate photos with picasaweb, send e-mail and text messages via gmail, and integrate incoming and outgoing calls with Grand Central. Voice mail will integrate with Grand Central. Such a phone will have GPS capabilities, will automatically give directions via Google Maps to the locations you want to go to, and will use AdWords to target users based on the location they are at. Hey, with Google entering Health Care why not let it sync with your Doctors Office or Pharmacy and provide your Medical Health History all for the Doctor to see? All the pieces are slowly coming into place – how long will it be before Google owns the Cell Phone market? Grand Central is just one more piece to this puzzle.

Hey – if you want an invite, let me know and I’ll send one your way.