I am trying to make a php page (It’s WordPresss but mostly custom php) that will have a text form that people can type in and send the text to their twitter feed. But I also want to capture the text, process it and do something with it and thank them if they tweet.
This is how I am doing it right now. The home page content is just this
<?php
$mess= $_POST['message'];
if($mess=='') {
include_once('welcome.php');
} else {
include_once('thanks.php');
}
?>
welcome.php just makes the form and posts back to this same page with the message. That works fine.
The thanks.php just prints the message on the screen and puts a Twitter tweet button with their message attached. If they click on the button, it pops up a window with their twitter page where they can choose to submit it to Twitter or not.
But how do I know if they actually go through and submit the tweet? I want to thank them for actually tweeting, not just brining up their twitter page and then closing it without tweeting.
Anyone have any idea how to do this? Maybe I am doing this an overly complicated way.
you can’t get if user clicks close but you can detect if user tweet after you redirect it to tweet share box,
you should use Web Intents Javascript Events