Thursday, October 20, 2011

Self-Service is Key to Success

Twilio CEO Jeff Lawson argued that two of the ways APIs can be successful in courting new developers are by being self-service and by having a freemium option.

I couldn't agree more.

Developers should be able to visit your website and get started right away, without paying a thing first. And, the documentation must be readable.

Source: API Evangelist

Heroku PHP now supports MongoDB

Previously, I posted about Heroku NOT supporting MongoDB.

However, their support got back to me after 1 week, and now its supported. I have verified :)

Instructions at github here

Thursday, October 13, 2011

Heroku PHP does NOT support MongoDB

This is a personal experience. As of 14th Oct 2011, Heroku PHP does not support MongoDB.

You might expect it to just work, since MongoHQ is listed as an add-on in Heroku.

However, when I use Mongo php class, it gave me a fatal error "Mongo class not found".

I contacted Heroku support, and this is verified - their PHP instance still do not support MongoDB.

Duh.. that's pretty dumb. Looks like Heroku support for it's new languages is still lagging.

Wednesday, October 12, 2011

TalkSpace let you call between users for free

Create a TalkSpace (aka a conference room), and let participants talk for free!

The API/SDK can be used for iOS clients, or even Facebook platform. So if you are developing on these platforms, throw in the SDK and let your users chatter!

API Documentation here.

Friday, October 7, 2011

Google Cloud SQL (with App Engine)

Google has announced their Cloud SQL API.

Up till now, Google has only offer Datastore API on App Engine. Datastore is based on big table database, and is unlike the more commonly known MySql database.

With this Cloud SQL, Google is offering a MySql database on their infrastructure. It is simple to use. Simply setup an instance, and do your SQL in Java or Python!

This API is currently in Beta and is free. It will be paid someday.

Graph API for Travel

Facebook Open Graph API is the king to building social graph, with friend, group, event, etc as key objects.

The king for travel API would have to be Add to Trip. It let developers build social travel graph by populating with flight, hotel, itinerary, participants, etc.

Cool API, since that means developers don't have to design the same data model (again).

However, Add to Trip API is not free.

Tuesday, October 4, 2011

What is (Facebook) Signed Request?

Facebook continues to improve their API and move towards a modern platform, and in the process not supporting for OAuth 1.x and unsecure HTTP.

Signed Request is another new improvement. Now, Facebook use signed_request, and drop fb_sig. Read this what what signed request do for you.

I am going to explain in short what Signed Request do.

When a user use your Facebook app, Facebook will make a http post to your canvas URL. In this http post (a call back notification), Facebook will provide you with information such as the user's country and oauth_token.

In order to secure this payload information, Signed Request is used. Using your app's secret, which ONLY you and Facebook know, the payload is hashed with the secret to produce a signature.

sign_request = signature.payload

When you receive the sign_request, you can hash the payload with your app's secret, and then compare to  the signature. If it doesn't match, that means someone is modifying the content (eg. man-in-the-middle attack).


Monday, October 3, 2011

Heroku Pricing Explained

For newbies to Heroku, the pricing is not easy to understand at first.

You can refer to the article: how much a dyno cost?

In short, you need to know Heroku charge by dyno hours. And there are 2 type of dyno:

  1. Web Dyno
  2. Worker Dyno
And for each app, you are given 750 free dyno hours!

So if you run 1 web dyno for 400 hours, and 1 worker dyno for 400 hours, that means you spend 800 dyno hours. Subtracting from the free 750 hours, you would therefore be billed 50 hours. 

Dynos cost $0.05 per hour, so 50 hours cost you $2.50.

Search Deals with Groupon API

A little known API from a huge commerce company: https://sites.google.com/site/grouponapiv2/home

Yeah I know their documentation is hosted on elementary Google Sites. But what can you expect from a company that has majority salesman, few developers.