title: Twitter: Search my tweets and retrieve user ids, cross reference with my followers?
body: <p>First off, I'm doing a contest where users must tweet a message 'just entered #cool-contest, more info at <a href="http://unique/url/239843" rel="nofollow noreferrer">http://unique/url/239843</a>' and I'm basically doing a search using the api:</p>
  
  <p><a href="http://search.twitter.com/search.atom?q=%40twitterapi+OR+%40twitter" rel="nofollow noreferrer">http://search.twitter.com/search.atom?q=%40twitterapi+OR+%40twitter</a></p>
  
  <p>Sample entry element:</p>
  
  <pre><code>  &lt;entry&gt;
      &lt;id&gt;tag:search.twitter.com,2005:5266369259&lt;/id&gt;
      &lt;published&gt;2009-10-29T19:03:56Z&lt;/published&gt;
      &lt;link type="text/html" href="http://twitter.com/mytweetsnl/statuses/5266369259" rel="alternate"/&gt;
      &lt;title&gt;THE_REAL_SHAQ: Shaq-A-Claus is coming to town! Check out my &amp;#8220;Join Shaq Give Back&amp;#8221; challenge, coming.. http://bit.ly/1OVKHR&lt;/title&gt;
      &lt;content type="html"&gt;THE_REAL_SHAQ: &amp;lt;b&amp;gt;Shaq-A-Claus&amp;lt;/b&amp;gt; is coming to town! Check out my &amp;#8220;Join Shaq Give Back&amp;#8221; challenge, coming.. &amp;lt;a href=&amp;quot;http://bit.ly/1OVKHR&amp;quot;&amp;gt;http://bit.ly/1OVKHR&amp;lt;/a&amp;gt;&lt;/content&gt;
      &lt;updated&gt;2009-10-29T19:03:56Z&lt;/updated&gt;
      &lt;link type="image/png" href="http://a3.twimg.com/profile_images/298078521/twitter_normal.gif" rel="image"/&gt;
      &lt;twitter:geo&gt;
      &lt;/twitter:geo&gt;
      &lt;twitter:source&gt;&amp;lt;a href=&amp;quot;http://twitterfeed.com&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;twitterfeed&amp;lt;/a&amp;gt;&lt;/twitter:source&gt;
      &lt;twitter:lang&gt;en&lt;/twitter:lang&gt;
      &lt;author&gt;
        &lt;name&gt;mytweetsnl (MyTweets.nl)&lt;/name&gt;
        &lt;uri&gt;http://twitter.com/mytweetsnl&lt;/uri&gt;
      &lt;/author&gt;
    &lt;/entry&gt;
  </code></pre>
  
  <p>I'm basically trying to search all retweets of the initial user ( me ) and tracking the string '#cool-contest' and '<a href="http://unique/url/239843" rel="nofollow noreferrer">http://unique/url/239843</a>' from the content element, then inserting the entries into a local database, but before I actually insert the entry I also need to determine whether said user is a follower or not, and this is why I need the user id to cross reference with followers:</p>
  
  <p><a href="http://twitter.com/followers/ids.xml?screen_name=101010" rel="nofollow noreferrer">http://twitter.com/followers/ids.xml?screen_name=101010</a></p>
  
  <p>Is there an extra parameter I'm missing so I can actually see the user ID? If not would the only way be to parse the twitter URI, so grab the username after 'twitter.com/user' from the <code>author</code> element and feed it as a name parameter?</p>
  
  <p><a href="http://twitter.com/followers/ids.xml?screen_name=mytweetsnl" rel="nofollow noreferrer">http://twitter.com/followers/ids.xml?screen_name=mytweetsnl</a></p>
  
  <p>I'm just a little hesistant because I'm not sure if the screen name is reliable since it may be updated in the future.</p>
  
  <p>My initial questions about this project ( if you want more info ): <a href="https://stackoverflow.com/questions/1648161/tweet-contest-logic-twitter">Tweet Contest logic ( Twitter )</a></p>