My tweeting from my app works fine -- here's the code:
require_once('twitteroauth/twitteroauth.php');
require_once('config.php');
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET,
$_SESSION['access_token']['oauth_token'],
$_SESSION['access_token']['oauth_token_secret']);
// this did nothing vis-a-vis popping up a 'Confirm your tweet' dialog box
//$content = $connection->get('account/verify_credentials');
$status = $connection->post('statuses/update',
array('status' => 'Not much snow this winter!'));
Obviously I'm using the outrageously helpful and well-known 'Abraham's Twitter OAuth' wrapper as the inspiration for the working code above.
So I have a submit button on a form -- when clicked the above code executes and puts the following tweet in my Twitter feed: Not much snow this winter!
I was inspired to get the above 'allow-tweets-from-our-web-site' code implemented after enjoying that feature on websites I use. We need to allow our users the ability to tweet stuff from our web site - and the above gets us nearly all the way there.
But -- there's one problem with my code above and I'm not finding out in the Twitter API docs nor in Abraham's docs how to get it to happen.
In the other sites I've used, here's the process:
1) log in to the web site 'TheSite' by way of your already-existing Twitter account
2) click 'tweet' on one of the pages of TheSite when you want to share something cool with your followers
3) a Twitter dialog box pops up allowing you to edit your tweet then commit the tweet
4) and after you click 'send' or whatever on the 'confirm your tweet' dialog box, your message is tweeted.
NOTE: this pre-tweet dialog is a Twitter dialog -- in the websites I've seen it appear it has the Twitter UI, etc. -- it's not a dialog window being popped up by TheSite.
The problem with my code is -- I can't figure out how to compel Twitter to pop up that 'pre-tweet confirmation dialog box' in step (3) above -- I can't even find it in the Twitter dev docs at dev.twitter.com/.
So right now my tweeting code above does NOT give my user the chance to confirm/possibly edit, or even back-out of their tweet before committing to Twitter -- my code above just Tweets.
Anyone know how to get this 'pre-tweet confirmation dialog box' to appear by way of the Twitter API?
If I could remember one of the websites where I've seen this 'pre-tweet confirm dialog box' appear I'd mention it but I visit too many sites and right now my mind is a blank, coding all day and have the flu. If you're sick in bed with the flu just write code and you'll won't notice it much.;L
Those generally aren't done using the API - instead, they're done via one of Twitter's embeddable buttons (which create a popup with confirmation).