Ok, so this seems pretty simple. There are three basic things that happen to turn cocoa beans into something reasonably approximating chocolate.
1: Fermentation
Counterintuitively, the first step in turning Cocoa beans into chocolate is getting RID of the sugars that are already there, allowing the natural yeasts and micro-organisms to turn the sugars in a ripe bean into alcohol, and then acetic acid. This is critical in generating the aromas and flavors that we associate with chocolate.
Fermentation is also a pretty common process in digestion though, so it's totally plausible that an organism could eat the beans and, in the process of digesting them, complete the fermentation.
2: Roasting
The roasting does a few things. It removes the husks from the actual choco-meat, it sterilizes the choco-meat, and it does some more chemstry to improve the flavor. In the case of an animal, the first of those items can be handled by chewing, the second is... probably just not going to happen, and the third can be managed by the appropriate acidic environment in the digestive system.
3: Addition of sugar
The easiest way to manage this is for our animal to supplement its diet of cocoa beans with other stuff that has lots of sugar. Fruits, for example, sugar cane depending on location, stuff like that.
All of that having been said, there's a clear answer right here.
BEES!
Big, freaking, cretaceous sized monster bees. They do the honey thing, but ALSO like to have a gnosh on cocoa beans. The two things get mixed together and then vomited up into giant beehives just like modern bees do honey, only more choco-tastic.