While the TV show goes a long way to make explicit of what happened according to their interpretation (see answer by @KharoBangdo), this is not necessarily the only truth.
As far as the information provided in the books is concerned, what gives you the idea that the poison in the cup indeed came from the necklace? In general, is it reasonable to deduct this?
The fact that someone is killed with a poison that can be identified from its symptoms at first glance, and someone else has a necklace with traces of that very poison does not mean that the poison that killed the victim came from the necklace, and it couldn't have been applied independently.
For the culprit, it is sufficient to place a single drop of poison into the necklace, only just enough so that the zealous examiner (who, in this case, is not the brightest gem) will detect it.
Olenna could conceivably have carried a phial of Strangler on her, or a ring with a hidden compartment (akin to the murderers of Bravos, as explained when Maester Cressen attempts to poison Melisandre). She, or even someone completely different, could conceivably have poisoned anything, including the wine or the cake, without ever going near Sansa.
In fact, the Strangler comes as crystals
, not as liquid. However, for its application, it is usually dissolved. So, the culprit would either place scrapings of Strangler crystals or a watery solution for false evidence.