title: how to get the content/ string value when i parse the url?
body: <pre><code>String url="http://graph.facebook.com/GHost"; 
  URL objUrl = new URL(url);
  InputStream is= objUrl.openStream();
  DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();   
  DocumentBuilder db = dbf.newDocumentBuilder();
  Document doc = db.parse(new InputSource(is));
  String str=doc.getTextContent();&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;----------- getting null value
  JSONObject object = new JSONObject(str);&lt;&lt;&lt;&lt;---------making exception error
  String id = object.getString("id");
  if do open the url the content is like below
  {
      "id": "3965568744555",
      "name": "GHost",
      "picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/373042_396504583708761_1625984_s.jpg",
      "link": "http://www.facebook.com/GHost",
      "likes": 70,
      "cover": {
      "cover_id": 493579484270,
      "source": "http://a3.sphotos.ak.fbcdn.net/hphotos-ak-snc7/s720x720/396014_493579484001270_177795_n.jpg",
      "offset_y": 0
  },
  </code></pre>
  
  <p>how do i write the code at String str=? and finally i want to get the id value. please any help?</p>