JSON Proxy


The current Social Actions API doesn't support JSONP. This technique allows you to call a webservice from a different site than the site hosting the API. Because I needed to use JSONP to make the micro-lending widget I followed Adam Altemus example and rolled my own. I could have used his service but it doesn't support all the Social Actions parameters.
My service is open to anyone and can be found at::
Next to returning JSONP it behaves almost the same as the original Social Actions API with a few differences:

  • description for a project is empty by default. This allows for faster performance on clients with small bandwidths. If you need the description you can ad this parameter:
    Trimming the description is not yet working (so setting trim_description to 120 for instance doesn't work) as I have still to find a good regex that can do that without breaking the JSON encoded HTML.
  • takes a callback function. You'll need to provide the callback function (usually added by jquery) as parameter with the name callback

So if you would mimic this request to the Social Actions API:
on my server it would like: