I want to display the (optional) image of the tweets in the Home-Timeline but i´m not able to find the right keyword. I also looked at this documentation about entities in tweets. I created the entities dictionary and an media dictionary in the entities and requested the media_url but its nil. My code:
let tweet = self.dataSource[row] as! NSDictionary let entitiesDictionary = tweet.objectForKey("entities") as! NSDictionary print("after entities") let mediaDictionary = entitiesDictionary.objectForKey("media") as! NSDictionary print("after media") if mediaDictionary.objectForKey("media_url") != nil { print("Pic there") let picURL = NSURL(string: (userDictionary["media_url_https"] as! String).stringByReplacingOccurrencesOfString("_normal", withString: "_bigger", options: NSStringCompareOptions.RegularExpressionSearch, range: nil)) let image = NSData(contentsOfURL: picURL!) cell.tweetImage.image = UIImage(data: image!) }