title: Youtube Java API. Make YouTubeService without Login
body: <p>I am beginning to learn how to use the Java Youtube API, but I have run into a problem. I am following the tutorials given by Google:</p>
  
  <p><a href="http://code.google.com/apis/youtube/2.0/developers_guide_java.html" rel="nofollow">http://code.google.com/apis/youtube/2.0/developers_guide_java.html</a></p>
  
  <p>The problem is, is that you seem to need a YouTubeService object to make queries. It seems like the only way to make this is with the user logging in. How can I make queries without having the user log in?</p>
  
  <pre><code>    YouTubeService service = new YouTubeService();  //???? How do I make a proper YouTubeService without login. There is no constructor without and parameters.
      String search = "Dubstep";
  
      try {
          YouTubeQuery query = new YouTubeQuery(new URL("http://gdata.youtube.com/feeds/api/videos"));
          query.setOrderBy(YouTubeQuery.OrderBy.RELEVANCE);
          query.setFullTextQuery(search);
          query.setSafeSearch(YouTubeQuery.SafeSearch.NONE);
  
          VideoFeed videoFeed = service.query(query, VideoFeed.class);
          printVideoFeed(videoFeed, true);  // Eclipse also doesn't recognize this method.
  
      } catch (MalformedURLException e) {
          e.printStackTrace();
      }
  </code></pre>
  
  <p>I am really confused by this, and I really need this help. </p>
  
  <p>Thanks!</p>