Since being the subject of an AoO is dependent on your actions and not that of the attacker, you would still be subject for the AoO for doing the same action regardless as to whether or not you are visible. However, if the attacker is completely unaware of your presence then I wouldn't have the attacker get an AoO on you. If you walk up to someone, while invisible and drink a potion without him being aware, then you wouldn't take an AoO. If you were fighting him for a couple of rounds, turned invisible and then drank a potion I would make you suffer the AoO (he still has a 50% miss chance) as I could see him flailing madly about with his weapon and since you're no longer actively trying to defend yourself it might slip through.
IceBear