<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Collabtweet - Multiple Users, Single Twitter Account</title>
	<atom:link href="http://anantgarg.com/2009/05/20/collabtweet-multiple-users-single-twitter-account/feed/" rel="self" type="application/rss+xml" />
	<link>http://anantgarg.com/2009/05/20/collabtweet-multiple-users-single-twitter-account/</link>
	<description>on web development</description>
	<pubDate>Thu, 29 Jul 2010 19:27:32 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: nettigritty.com Support</title>
		<link>http://anantgarg.com/2009/05/20/collabtweet-multiple-users-single-twitter-account/comment-page-1/#comment-5388</link>
		<dc:creator>nettigritty.com Support</dc:creator>
		<pubDate>Tue, 20 Apr 2010 05:31:48 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=273#comment-5388</guid>
		<description>Since the last posting did not accept code, for everyone getting a success message but no update in twitter, modify the setStatus function in twitter.php as per

http://www.nettigritty.com/collabtweet.twitter.php.txt</description>
		<content:encoded><![CDATA[<p>Since the last posting did not accept code, for everyone getting a success message but no update in twitter, modify the setStatus function in twitter.php as per</p>
<p><a href="http://www.nettigritty.com/collabtweet.twitter.php.txt" rel="nofollow">http://www.nettigritty.com/collabtweet.twitter.php.txt</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nettigritty.com Support</title>
		<link>http://anantgarg.com/2009/05/20/collabtweet-multiple-users-single-twitter-account/comment-page-1/#comment-5387</link>
		<dc:creator>nettigritty.com Support</dc:creator>
		<pubDate>Tue, 20 Apr 2010 05:25:42 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=273#comment-5387</guid>
		<description>For everyone getting a success message but no update in twitter, modify the setStatus function in twitter.php as follows:

        public function setStatus($stat) {

                if(strlen($stat) user:$this-&gt;pass");

$result = curl_exec($curl);
$resultArray = curl_getinfo($curl);




                if ($resultArray['http_code'] == 200) ;
                        return true;

                return false;
        }</description>
		<content:encoded><![CDATA[<p>For everyone getting a success message but no update in twitter, modify the setStatus function in twitter.php as follows:</p>
<p>        public function setStatus($stat) {</p>
<p>                if(strlen($stat) user:$this-&gt;pass&#8221;);</p>
<p>$result = curl_exec($curl);<br />
$resultArray = curl_getinfo($curl);</p>
<p>                if ($resultArray['http_code'] == 200) ;<br />
                        return true;</p>
<p>                return false;<br />
        }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon</title>
		<link>http://anantgarg.com/2009/05/20/collabtweet-multiple-users-single-twitter-account/comment-page-1/#comment-5317</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Thu, 15 Apr 2010 03:25:19 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=273#comment-5317</guid>
		<description>Tried what c0bra suggested but still does not work :(

PHP server returns this error message each time a request is sent:

* About to connect() to twitter.com port 80 (#0)
*   Trying 128.242.240.20... * connected
* Connected to twitter.com (128.242.240.20) port 80 (#0)
* Server auth using Basic with user 'xxxx'
&gt; POST /statuses/update.xml?status=Testing+Collabtweet HTTP/1.1
Authorization: Basic XXXX
Host: twitter.com
Accept: */*
Content-Length: -1
Content-Type: application/x-www-form-urlencoded

* Closing connection #0
* Failure when receiving data from the peer</description>
		<content:encoded><![CDATA[<p>Tried what c0bra suggested but still does not work <img src='http://anantgarg.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>PHP server returns this error message each time a request is sent:</p>
<p>* About to connect() to twitter.com port 80 (#0)<br />
*   Trying 128.242.240.20&#8230; * connected<br />
* Connected to twitter.com (128.242.240.20) port 80 (#0)<br />
* Server auth using Basic with user &#8216;xxxx&#8217;<br />
&gt; POST /statuses/update.xml?status=Testing+Collabtweet HTTP/1.1<br />
Authorization: Basic XXXX<br />
Host: twitter.com<br />
Accept: */*<br />
Content-Length: -1<br />
Content-Type: application/x-www-form-urlencoded</p>
<p>* Closing connection #0<br />
* Failure when receiving data from the peer</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cupcakes</title>
		<link>http://anantgarg.com/2009/05/20/collabtweet-multiple-users-single-twitter-account/comment-page-1/#comment-5000</link>
		<dc:creator>cupcakes</dc:creator>
		<pubDate>Fri, 19 Mar 2010 19:01:02 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=273#comment-5000</guid>
		<description>Added the following code to collabtweet.php to fill out the URL shortening problem: 

function shorten_url($matches) {
    // EDIT: the preg function will supply an array with all submatches
    $long_url = $matches[0];

    // API stuff here...
    $url = "http://tinyurl.com/api-create.php?url=$long_url";
    return file_get_contents($url);
}

function tweet() {
	include_once('twitter.php');

	global $twitterUser;
	global $twitterPass;

	$curTwitter = new twitter("$twitterUser", "$twitterPass");

	$loggedin = authenticate();

	if ($loggedin == 0) {
		echo "0";
		exit;
	}

	$tweetShortened = preg_replace_callback('&#124;http(s)?://([a-z0-9?./\-\_=%#]{1,500})&#124;i', 'shorten_url', $_POST['tweet']);

	$status = $tweetShortened.' -'.$_SESSION['username'];

	if ($curTwitter-&gt;setStatus($status) == true) {
		echo "$twitterUser";
	} else {
		echo "0";
	}
}</description>
		<content:encoded><![CDATA[<p>Added the following code to collabtweet.php to fill out the URL shortening problem: </p>
<p>function shorten_url($matches) {<br />
    // EDIT: the preg function will supply an array with all submatches<br />
    $long_url = $matches[0];</p>
<p>    // API stuff here&#8230;<br />
    $url = &#8220;http://tinyurl.com/api-create.php?url=$long_url&#8221;;<br />
    return file_get_contents($url);<br />
}</p>
<p>function tweet() {<br />
	include_once(&#8217;twitter.php&#8217;);</p>
<p>	global $twitterUser;<br />
	global $twitterPass;</p>
<p>	$curTwitter = new twitter(&#8221;$twitterUser&#8221;, &#8220;$twitterPass&#8221;);</p>
<p>	$loggedin = authenticate();</p>
<p>	if ($loggedin == 0) {<br />
		echo &#8220;0&#8243;;<br />
		exit;<br />
	}</p>
<p>	$tweetShortened = preg_replace_callback(&#8217;|http(s)?://([a-z0-9?./\-\_=%#]{1,500})|i&#8217;, &#8217;shorten_url&#8217;, $_POST['tweet']);</p>
<p>	$status = $tweetShortened.&#8217; -&#8217;.$_SESSION['username'];</p>
<p>	if ($curTwitter-&gt;setStatus($status) == true) {<br />
		echo &#8220;$twitterUser&#8221;;<br />
	} else {<br />
		echo &#8220;0&#8243;;<br />
	}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cupcakes</title>
		<link>http://anantgarg.com/2009/05/20/collabtweet-multiple-users-single-twitter-account/comment-page-1/#comment-4999</link>
		<dc:creator>cupcakes</dc:creator>
		<pubDate>Fri, 19 Mar 2010 18:35:12 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=273#comment-4999</guid>
		<description>It would be nice if you had URL shortening integration that detects that a URL has been entered and immediately shortens it.</description>
		<content:encoded><![CDATA[<p>It would be nice if you had URL shortening integration that detects that a URL has been entered and immediately shortens it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Iulius</title>
		<link>http://anantgarg.com/2009/05/20/collabtweet-multiple-users-single-twitter-account/comment-page-1/#comment-4294</link>
		<dc:creator>Iulius</dc:creator>
		<pubDate>Wed, 20 Jan 2010 11:13:26 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=273#comment-4294</guid>
		<description>Love this script. Thanks for your work :)</description>
		<content:encoded><![CDATA[<p>Love this script. Thanks for your work <img src='http://anantgarg.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pablo</title>
		<link>http://anantgarg.com/2009/05/20/collabtweet-multiple-users-single-twitter-account/comment-page-1/#comment-3412</link>
		<dc:creator>Pablo</dc:creator>
		<pubDate>Tue, 01 Dec 2009 17:08:34 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=273#comment-3412</guid>
		<description>Our server has curl and supports it. But the app doesn't wants to work... tested in two servers.</description>
		<content:encoded><![CDATA[<p>Our server has curl and supports it. But the app doesn&#8217;t wants to work&#8230; tested in two servers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: c0bra</title>
		<link>http://anantgarg.com/2009/05/20/collabtweet-multiple-users-single-twitter-account/comment-page-1/#comment-3153</link>
		<dc:creator>c0bra</dc:creator>
		<pubDate>Sun, 22 Nov 2009 15:39:27 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=273#comment-3153</guid>
		<description>found the bug in the software:

just add

curl_setopt($this-&gt;ch, CURLOPT_HTTPHEADER, array('Expect:'));

@ line 38 (where the other curl options are) in the twitter.php file and it will work!

nevertheless nice work!</description>
		<content:encoded><![CDATA[<p>found the bug in the software:</p>
<p>just add</p>
<p>curl_setopt($this-&gt;ch, CURLOPT_HTTPHEADER, array(&#8217;Expect:&#8217;));</p>
<p>@ line 38 (where the other curl options are) in the twitter.php file and it will work!</p>
<p>nevertheless nice work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rutger</title>
		<link>http://anantgarg.com/2009/05/20/collabtweet-multiple-users-single-twitter-account/comment-page-1/#comment-3082</link>
		<dc:creator>Rutger</dc:creator>
		<pubDate>Thu, 19 Nov 2009 14:46:25 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=273#comment-3082</guid>
		<description>Thanks! Works like a charm. If you have any problems, check if your server allows curl.

Regards,
R.</description>
		<content:encoded><![CDATA[<p>Thanks! Works like a charm. If you have any problems, check if your server allows curl.</p>
<p>Regards,<br />
R.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pablo PARRADO</title>
		<link>http://anantgarg.com/2009/05/20/collabtweet-multiple-users-single-twitter-account/comment-page-1/#comment-3055</link>
		<dc:creator>Pablo PARRADO</dc:creator>
		<pubDate>Wed, 18 Nov 2009 21:21:55 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=273#comment-3055</guid>
		<description>Installed Collabtweet, everything seems to be in order; it says, “Your twitter profile has been successfully updated.” Nothing actually happens on Twitter, though. Any ideas what might be going wrong?

Saw more feedbackon this in the website but unfortunatelly without answers.

Take care</description>
		<content:encoded><![CDATA[<p>Installed Collabtweet, everything seems to be in order; it says, “Your twitter profile has been successfully updated.” Nothing actually happens on Twitter, though. Any ideas what might be going wrong?</p>
<p>Saw more feedbackon this in the website but unfortunatelly without answers.</p>
<p>Take care</p>
]]></content:encoded>
	</item>
</channel>
</rss>
