Hi All,

For one of my webapps, I am trying to have all of the functionality
driven on the client-side as much as possible.  One of the features I
would like to have is to list a user's direct messages in a sidebar or
something.  I would really like to use the json feed to get the data,
and have some javascript parse and display it. The problem is that
this request requires a POST and HTTP Authentication, so I can't
exactly just put <script src="http://twitter.com/direct_messages.json";
type="text/javascript"></script> in my code and have it load
properly.  Likewise, I cannot create an AJAX request (from jquery or
some such library) for "http://twitter.com/direct_messages.json";
because that runs into the cross-site request restriction.  In the
past I have gotten around this by making a local php "proxy" page that
actaully uses cURL behind the scenes to get the remote data and use
that page in the AJAX request, but this is just a kludge and really
becomes a server-side function, potentially becoming a bottleneck.

So, does anyone know of a way to make a truly client-side request for
this data while taking care of the POST and authentication
requirements?

Thanks for any info,
-Chad

Reply via email to