From what I understand pineapple is debatable. Some say yes and some say no. The reason that some people say no is that pineapple has a high acid content which is not good for their stomach. A very small amount should be fine but honestly I would avoid. There are plenty other things he can have instead.
You'll probably find that you'll make your way through that safe food list to figure out what he likes
. With apples make sure he doesn't eat the seeds because they are poisonous and don't give too often. If he likes his apple though I bet good money he'll love broccoli - most hamsters do
. Do also make sure to wash any fruit and veg with water as they're small little furballs and even the smallest amount of something bad on his food will harm them.