fix for IE (forEach doesn't work in IE). Also added urlencoding and the url parameter to twitter.