One more note: You have to have the appropriate technology to gain the resource. If you capture a city with a bunch of Dye plantations already built, but you don't yet have Calendar, you won't get the happy face for the resource (although you can work the tiles for coinage). The same applies if you build a city on top of a resource. I've heard that Oil is an exception (perhaps because two different technologies allow wells/platforms?).
oops you're right and i was wrong. i just WBd it since i was sure i remembered it the other way.
even for bronze/iron/coal/uranium, if it's on flat land and someone has already mined it, you get +2 hammers from the mine, even if you can't yet see what's there. that one kind of surprised me and kind of didn't. you can't mine flat lands yourself unless you see something on it, but i guess a mine is an improvement no matter where it is.
you can also use watermills (to get the basic +1h) and windmills (to get the basic +1f/+1c) even if you can't build them. you can work cottages (and they even grow!) before you know pottery.
i wasn't sure how to interpret your comment about oil, so i tested that one too. if uranium is already mined (even if you don't know mining), or oil is already oil well'd/platformed, if you can see it (physics or sci method) you can use it (and get the +3c or +2h +1c). yes, WB lets you have physics without mining *giggle*. as above tho, you don't get credit for owning the resource until you have the appropriate tech. for a city placed stone on a plains hill you do get 2f/3h/1c before you know masonry, i already knew that one but yummm.
one exception i did find ... you do get +1 happy for a whale if it has a whaling boat on it, even if you don't know optics to build your own whaling boats, even if you don't know fishing to work the square itself!