<?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>GirlieMac! Blog &#187; Twitter</title>
	<atom:link href="http://girliemac.com/blog/category/twitter/feed/" rel="self" type="application/rss+xml" />
	<link>http://girliemac.com/blog</link>
	<description>Web and Mobile Development</description>
	<lastBuildDate>Tue, 27 Dec 2011 22:05:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Find Your Tweeting Neighbor on iPhone with GeoLocation</title>
		<link>http://girliemac.com/blog/2009/06/21/find-your-tweeting-neighbor-on-iphone-with-geolocation/</link>
		<comments>http://girliemac.com/blog/2009/06/21/find-your-tweeting-neighbor-on-iphone-with-geolocation/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 02:20:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Sandbox]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://girliemac.com/blog/2009/06/21/find-your-tweeting-neighbor-on-iphone-with-geolocation/</guid>
		<description><![CDATA[iPhone OS 3.0 is now available, and developers can take advantage of the newly introduced geolocation feature in Safari browser. To try it out quickly, I used [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_jade" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fgirliemac.com%252Fblog%252F2009%252F06%252F21%252Ffind-your-tweeting-neighbor-on-iphone-with-geolocation%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Find%20Your%20Tweeting%20Neighbor%20on%20iPhone%20with%20GeoLocation%22%20%7D);"></div>
<p><img src="http://girliemac.com/blog/wp-content/images/neighbortweet.png" alt="screenshot"/></p>
<p>iPhone OS 3.0 is now available, and developers can take advantage of the newly introduced <strong>geolocation</strong> feature in Safari browser.</p>
<p>To try it out quickly, I used Twitter Search API again to create a tiny test app called, <a href="http://girliemac.com/geo" target="_blank"/>NeighborTweet</a>, which enable you to find out who are tweeting in your neighborhood. Basically, what it does is that obtain your location, and pass the latitude and longitude data to Twitter search and display the result tweets.</p>
<p>Try it out on your iPhone with:<br />
Short URL <a href="http://girliemac.com/geo" target="_blank"/>http://bit.ly/K0ZaE</a><br />
or<br />
<a href=http://qrcode.kaywa.com/img.php?s=8&#038;d=http%3A%2F%2Fgirliemac.com%2Fgeo">This QR Code</a> with scanning app like BeeTagg.</p>
<p>If you are interested in learning more on Twitter search API and geocode, please read <a href="http://apiwiki.twitter.com/Twitter-Search-API-Method%3A-search" target="_blank">Twitter Wiki</a>.</p>
<p>OK, now here&#8217;s the code.<br />
To find out your location with Geolocation class is simple &#8211; you just call <code>getCurrentPosition()</code> method. This initiates an asynchronous request to detect the user&#8217;s position.</p>
<pre class="js">
<code>
navigator.geolocation.getCurrentPosition(someFunction)
</code>
</pre>
<p>Get latitude and longitude, by using <code>coords</code> instance:</p>
<pre class="js">
<code>
latitude = position.coords.latitude;
longitude = position.coords.longitude;
</code>
</pre>
<p>Here&#8217;s an actual code I used to create the sample app:</p>
<pre class="js">
<code>
if (navigator.geolocation) {
  navigator.geolocation.getCurrentPosition(function(position) {
    callback(position.coords.latitude, position.coords.longitude);
  });
} else {
  alert("Geolocation services are not supported by your browser.");
} 

function callback(lat,lon){
  // twitter search json-p callback
  var geocode = "&#038;geocode=" + lat + "%2C" + lon + "%2C1mi";
  var fullUrl = url + geocode;
  ...
}
var url = "http://search.twitter.com/search.json?callback=getTweets";

function getTweets (json) {
  // display json data
  ...
}
</code>
</pre>
<h3>References</h3>
<p>Geolocation References:</p>
<ul>
<li><a href="http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariWebContent/GettingGeographicalLocations/GettingGeographicalLocations.html" target="_blank">Safari Reference Library &#8211; Getting Geographic Locations</a> &#8211; Apple Developer Connection</li>
<li><a href="https://developer.mozilla.org/En/Using_geolocation" target="_blank">Using geolocation</a> &#8211; Mozilla Developer Center</li>
<li><a href="http://www.w3.org/TR/geolocation-API/" target="_blank">Geolocation API Specification</a> &#8211; W3C Working Draft</li>
</ul>
<p>More References:</p>
<ul>
<li><a href="http://apiwiki.twitter.com/Twitter-Search-API-Method%3A-search" target="_blank">Twitter Search API Wiki</a></li>
<li><a href="http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/" target="_blank">Remote JSON &#8211; JSONP</a></li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://girliemac.com/blog/2009/06/21/find-your-tweeting-neighbor-on-iphone-with-geolocation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TweetTrendDunno &#8211; Played with APIs</title>
		<link>http://girliemac.com/blog/2009/06/16/tweettrenddunno-played-with-apis/</link>
		<comments>http://girliemac.com/blog/2009/06/16/tweettrenddunno-played-with-apis/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 05:20:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[App]]></category>
		<category><![CDATA[GirlieMac! News]]></category>
		<category><![CDATA[Sandbox]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://girliemac.com/blog/2009/06/16/tweettrenddunno-played-with-apis/</guid>
		<description><![CDATA[I had a plenty of time to stay home and play with code right now so I mashed Twitter trend API, mixed with some BOSS news and [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_jade" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fgirliemac.com%252Fblog%252F2009%252F06%252F16%252Ftweettrenddunno-played-with-apis%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22TweetTrendDunno%20-%20Played%20with%20APIs%22%20%7D);"></div>
<p><img src="http://girliemac.com/blog/wp-content/images/tweettrend.png" alt="TweetTrendDunno screenshot" /><br />
I had a plenty of time to stay home and play with code right now so I mashed Twitter trend API, mixed with some BOSS news and image search stuff I used before, also Microsoft&#8217;s new Bing search results to create some silly and handy web app called <a href="http://girliemac.com/tweetNews/">TweetTrendDunno</a>.</p>
<p>Basically, this grabs Twitter &#8220;trending topic&#8221; terms, and as a user click on each term you want to know about, it displays news articles, images, and Bing results (usually summary from Wikipedia helps you to figure out what the term means in general).</p>
<p>If you are Twitter user and ever wonder what people are talking about, give <a href="http://girliemac.com/tweetNews/">TweetTrendDunno</a> a try!</p>

]]></content:encoded>
			<wfw:commentRss>http://girliemac.com/blog/2009/06/16/tweettrenddunno-played-with-apis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

