Posted by & filed under API, Freshbooks, PHP.

So, I came across a project for work where I had to work with the Freshbooks API. Instead of having users put in their “API URL” and “Authentication Token” everytime (by going to their Freshbooks > My Account > Freshbooks API), which was just inconvenient. I registered my app for Freshbooks OAuth use. Problem was, there wasn’t an great documentation on how to implement Freshbooks and OAuth calls. I tried authenticating with OAuth classes that were already built, but the problem was that Freshbooks expects an Authorization header and not Authorization posted to the body, as far as I could see. So, I read a blog entry on Formstack’s blog and started writing a Freshbooks API with OAuth class. I was able to get Authentication working and grab an access token, etc. but a problem lied where I couldn’t figure out how to send requests to Freshbooks API with an OAuth header. I contacted Michael Mattax ( @mmattax ) via email and he helped me out a little with a cURL function to send requests to Freshbooks API.

So, first off, after expanding the file available for download you’ll see and “index.php” and a folder “src” which contains: “freshbooks.php” and “config.php”.

** Updated October 1st, 2010

Read more »

Posted by & filed under jQuery.

What is it?
How to Use
Options
Demonstrations
Download Code

What is it?:

TwitLimit is a Twitter-esque character limit jQuery plug-in. Licensed under the MIT & GPL licenses.

How to Use:

1. Include the jQuery library from Google Code and then include the TwitLimit javascript file.
<script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js”></script>
<script type=”text/javascript” src=”/twitlimit/twitlimit-0.2.0.compressed.js”></script>
2. Put a “counter” div and a textarea in your HTML body.
<div id=”limit”></div>
<textarea id=”limitThis”></textarea>
3. Make use of the plug-in using a selector.
<script type=”text/javascript”>
$(document).ready(function() {
$(‘#limitThis’).twitLimit({});
});
</script>

Boom! There ya go!

Options:

Key Default Value Description
limit 140 Default limit, if no limit set upon selector. (In honor of Twitter <3)
message %1 Characters Remaining. Keep %1 intact when defining custom message. (%1 is replaced by number of characters left.)
counterElem #limit ID or Class of element where you want the message to display.
allowNegative false Whether to allow the count to go negative or not.
dangerMode true Will change the number of characters left “%1″ with the colors defined in dangerColors.
dangerBold true Will make the number of characters left “%1″ bold.
dangerColors {

dark:550505‘,

medium:980808‘,

bright:e90909
}

Colors for dangerMode.
onNegative null Called when character limit is less than zero.
onPositive null Called for when character limit is greater than or equal to zero.

Posted by & filed under iPhone, Review.

I’ve been using TwitBird for iPhone ever since I registered for Twitter and felt the need to update from my iPhone. At the time, there was one version and it was free. Soon, they rolled out two other version: Premium ($1.99, ad-free, 2 accounts, PUSH capabilities) and Pro ($2.99,ad-free, 16 accounts, PUSH capabilities). I just updated to their most recent release Version 2.5 and love all that they’ve done with the app.

TwitBird in detail:

TwitBird has many settings that effect all accounts, including but not limited to: Auto Refreshing tweets, a theme to use throughout the app (currently they provide four themes),  integration with third parties (Facebook, URL Shorteners, etc.), Image Compression, and clearing image cache.

Once you sign in with Twitter, you’ll have access to your account. You’ll be able to view your Home feed, tweets your were mentioned in, direct messages, your favorites, your tweets, and saved searches to name a few. You’ll be able to set up Push Notifications so DM’s and mentions push to your phone. You can access “Nearby Tweets” from users who are tweeting close to your location. You can search twitter and view your profile amongst other functions.

Read more »