Sometimes Twitter doesn't respond -- that's a server latency issue
(and they've been down more than a few times :) )

However, Twitter doesn't allow crossdomain communication because of
their crossdomain policy. Many developers have worked around this by
creating server-side proxies, but if you can't/don't want to do this,
you're out of luck.

ere's a sample of the proxy script I use:

<?php
        $contentPath = $_REQUEST["url"];
        $contents = file_get_contents($contentPath);
        header("Via:  Simple Proxy Script");
        header("X-Powered-By: Simple Proxy Script");
        header("Allow: GET, POST");
        header("Expires: Tue, 01 Jan 1980 00:00:00 GMT");
        header("Cache-Control: no-cache, must-revalidate");
        header("Pragma: no-cache");
        header("Content-Type: application/rss+xml"); //Shouldn't be using
this for anything else!
        header("Content-Length: ".strlen($contents)); //Extra character at
the end?
        echo $contents;
?>

To proxy data, you would simply use:

http://www.myserver.com/proxy.php?url=www.twitter.com/etc

The only thing you may want to change/update is the content-type
header; I use the RSS feed but if you're using JSON or something, this
will wrongly identify the returned data. Also, if you don't want the
possibility of opening up the script for anyone to get data from
anywhere, you'll want to hardcode a part of all of the target URL.

The simplicity of the workaround really begs the question why Twitter
blocked/continues to block ("temporarily") access to the web-based
API, why they haven't updated this "fix" or provided any sort of
solution or even a note on their website to notify developers of the
status, and why no one seems to be pointing this out.

I mean, if Twitter wants to disable API access then disable it! Don't
put a dumb hurdle in the path of developers, promise a "fix", and then
sit on your thumbs. Maybe we should boycott Twitter until they live up
to their promise?

On Aug 31, 11:35 am, arezki <northafricajour...@gmail.com> wrote:
> I have been following these requests for help and wonder what's
> happening. I am actually affected myself and I am by no means spammer,
> just an industry analyst. So my sense twitter has scripting
> issues...problem is that twitter does not seem to respond.  Here's the
> link, click at the last page listed at the bottom for the most recent
> threads"  http://help.twitter.com/forums/31935/entries/49964?page=30

Reply via email to