I wanted to get like count numbers from this link
http://api.facebook.com/restserver.php?method=links.getStats&urls=http://www.apple.com
var xml = "http://api.facebook.com/restserver.php?method=links.getStats&urls=http://www.apple.com;"
var xmlDoc = $.parseXML(xml),
$xml = $(xmlDoc),
$title = $xml.find( "like_count" );
$('.countnumber').text($title.text());
however, I got this error
Uncaught Error: Invalid XML: http://api.facebook.com/restserver.php?method=links.getStats&urls=http://www.apple.com;
Is there a way to parse it by javascript?
Thanks
xmlcontain?xmlis not a xml value.. it is a url... you need to read the contents of the url first