Skip to content

Instantly share code, notes, and snippets.

@vincentchu
Created February 6, 2009 19:11
Show Gist options
  • Save vincentchu/59554 to your computer and use it in GitHub Desktop.
Save vincentchu/59554 to your computer and use it in GitHub Desktop.
FB.XFBML.Host.autoParseDomTree = false;
var all_spans = document.getElementsByTagName("span");
var i = 0;
var longstring = "ids: ";
for (i=0; i<all_spans.length; i++) {
if ( /xfbml_nae_.*/.test(all_spans[i].id) ) {
longstring += (all_spans[i].id + " -- ");
FB.XFBML.Host.addElement(new FB.XFBML.Name($(all_spans[i].id)));
} else if ( /xfbml_pic_.*/.test(all_spans[i].id) ) {
longstring += (all_spans[i].id + " xx ");
FB.XFBML.Host.addElement(new FB.XFBML.ProfilePic($(all_spans[i].id)));
}
}
FB.XFBML.Host.addElement(new FB.XFBML.Name($("xfbml_name_1")))
FB.XFBML.Host.refresh();
alert("IDS FOUND: " + longstring);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment