<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>YourSearchBuddy &#187; auto post</title>
	<atom:link href="http://www.yoursearchbuddy.com/tag/auto-post/feed" rel="self" type="application/rss+xml" />
	<link>http://www.yoursearchbuddy.com</link>
	<description>your search ends here</description>
	<lastBuildDate>Tue, 31 Jan 2012 19:47:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Using twitter API using Curl PHP</title>
		<link>http://www.yoursearchbuddy.com/twitter-api-curl-php</link>
		<comments>http://www.yoursearchbuddy.com/twitter-api-curl-php#comments</comments>
		<pubDate>Fri, 28 May 2010 19:12:39 +0000</pubDate>
		<dc:creator>wptricks</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[auto post]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[social]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://yoursearchbuddy.com/?p=317</guid>
		<description><![CDATA[I came across a problem of how to send my wordpress post directly to twitter using Curl, and after my several tries i found this solution. You can use this... <a class="meta-more" href="http://www.yoursearchbuddy.com/twitter-api-curl-php">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.neilletchford.com/wp-content/uploads/2009/01/twitter-bird-2.png" alt="Twitter API"  width=100 height=100 title="Using twitter API using Curl PHP" /></p>
<p>I came across a problem of how to send my wordpress post directly to twitter using Curl, and after my several tries i found this solution. You can use this as plugin as well in wordpress by saving this code in wp-content/plugins directory. Make sure you add your twitter credentials in the code before activating this plugin.</p>
<p>Here goes the code:<br />
$twitter_username = &#8220;your username&#8221;;<br />
$twitter_password = &#8220;your password&#8221;;</p>
<p>$post_title = get_the_title($post_ID);<br />
$permalink = get_permalink($post_ID);<br />
$tw_title = substr($post_title, 0,70);</p>
<p>               $message = &#8220;$tw_title $permalink&#8221;;<br />
              // The twitter API address<br />
               $url = &#8216;http://twitter.com/statuses/update.xml&#8217;;<br />
		// Set up and execute the curl process<br />
		$curl_handle = curl_init();<br />
		curl_setopt($curl_handle, CURLOPT_URL, &#8220;$url&#8221;);<br />
		curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);<br />
		curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);<br />
		curl_setopt($curl_handle, CURLOPT_POST, 1);<br />
		curl_setopt($curl_handle, CURLOPT_POSTFIELDS, &#8220;status=$message&#8221;);<br />
		curl_setopt($curl_handle, CURLOPT_USERPWD, &#8220;$twitter_username:$twitter_password&#8221;);<br />
		$buffer = curl_exec($curl_handle);<br />
		curl_close($curl_handle);</p>
<p>I also made the plugin for delicious, diigo and tumblr. If you want the plugin you can contact me at vickytechno@yahoo.com</p>
<p>This plugin lets you auto post to all these social networks via curl and also take care of SSL</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yoursearchbuddy.com/twitter-api-curl-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

