Olyver poses as Loras Tyrell's squire during a sparring match. He makes flirtatious advances toward Loras and the two later have sex. Olyver discovers that Loras is due to be married, and relays this information to Littlefinger shortly thereafter. Olyver implies that noblemen in Loras' position make up the bulk of his clientele.
In the A Song of Ice and Fire novels, there is no prostitute named Olyver. The character in the series assumes the role given to Dontos Hollard in the books, that of a spy for Littlefinger who reports the plan to marry Sansa Stark to a Tyrell. Ever since Sansa saved Dontos' life, he becomes her friend and confidant, and she innocently shares with him the plot to marry her to Willas Tyrell. Dontos reports this back to Littlefinger, who proceeds to inform the Lannisters. Since Dontos was largely cut from the series, the writers needed another way for Littlefinger to find out about the plot, hence Olyver.