Green apple = acetaldehyde. The primary cause of this is stress on the yeast. Perhaps you underpitched, and/or your yeast was very old, and/or if you racked to secondary and kegged and chilled too early for their liking, the yeast basically is giving you the bird for mistreating them.
Interestingly, acetaldehyde is a chemical that boils at 70 F. If you warm the keg up to 75 or 80 F and purge all the gas off numerous times over the course of about a week, it is possible you could make the yeast happier and get rid of most of the green apple character. However, this is super iffy, might not work. Might be easier to just toss the batch and start over, sorry to say.
Next batch, ensure you pitch a lot of healthy yeast (take a look at the calculator on mrmalty.com), and give the yeast sufficient time to do their thing before chilling things down, and you should be able to avoid this. When in doubt, give the yeast more time and keep 'em warm so they don't get mad at you. You'll know they're all done fermenting when the specific gravity stays constant for at least 3-4 days and they all settle down to the bottom of the fermenter.
Better luck next time. Don't give up. It's a fun hobby. Cheers.