I’m building a lottery system and I want people to follow using the follow button before showing them a tweet button.
So… I want to be able to do 2 things. First thing I have working but I’ll explain it. A user that isn’t following me, they click the follow button and successfully follows me. Then it fires the code below just fine.
twttr.events.bind('follow', function(event) {
document.getElementById("twitterStep1").style.display = "none";
document.getElementById("twitterStep2").style.display = "block";
});
BUT, say somebody is already following, so I don’t need them to complete this step. So is there a way to check if they are already following and run some JavaScript based on that so they can proceed to step 2.
I know I could use this if I ask them to click the follow button again.
twttr.events.bind(‘click’, function(event)
But that would allow somebody that isn’t a follower to proceed to the next step without following me on twitter.
Any ideas?