I have thus far been able to transmit a state in Google+ oAuth2, and Yahoo oAuth2, and even myopenid. Now I am at the Twitter stage of my provider login project.
I am using the three classes developed by @jmathai (tutorial here).
My signin code looks very similar to this:
include 'EpiCurl.php';
include 'EpiOAuth.php';
include 'EpiTwitter.php';
$consumer_key = 'R4**Fw';
$consumer_secret = 'blp**Z8SA';
$Twitter = new EpiTwitter($consumer_key, $consumer_secret);
echo '<a href="' . $Twitter->getAuthorizeUrl() . '">
<img src="twitterButton.png" alt="sign in with twitter" />
</a>';
It works pretty well. But I need to pass some state parameters, like a client id, an origin page url, and some other junk.
I don't see how this is done with the epicurl libraries.