I just created some php code to retweet a tweet that meets certain
criteria. The code executes fine from one webserver when called from a
browser on my vista laptop. The same webpage gives an error mesage on
anoher XP machine like this:

The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error
and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
Only one top level element is allowed in an XML document. Error
processing resource

When called from another webserver (and any machine) I get the
following error message:

Request Entity Too Large
The requested resource....does not allow request data with POST
requests, or the amount of data provided in the request exceeds the
capacity limit

I suspect it has something to do with the Curl libraries but I can't
figure out what needs to be corrected. The Curl code looks like this
after all base and header stuff is done:

$_h = array('Expect:');
$_h[] = substr($header, 0);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $resource);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, $_h);
$result = curl_exec($curl);
$resultArray = curl_getinfo($curl);
curl_close($curl);

$resource='http://api.twitter.com/1/statuses/retweet/'.
$thistweet.'.xml';

I am really stuck here and would appreciate some help

-- 
Twitter developer documentation and resources: https://dev.twitter.com/doc
API updates via Twitter: https://twitter.com/twitterapi
Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
https://groups.google.com/forum/#!forum/twitter-development-talk

Reply via email to