The cup was on Joff and Margerys table, I'm fairly certain it was the wine that was poisoned. He had a couple of bites of cake and was fine until that first sip of wine.
It's established that the fool, Sir Dontos, had knowledge that it was going down. To me, that rules out Obyern and his chick. Whoever did it is very close to the Lannisters and is familiar with Joff and Tyrions mutual hatred for each other.