Follow Button | If they are following do something else when clicked


#1

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?


#2

Or maybe just show specific content to a user if they are already following me on twitter. That possible?


#3

Just bumping this, would this be possible?


#4

wondering for same answer !!!
if anyone knows please post the answer


#5

Hi,

Because Follow buttons on websites do not go through an authorization step, we don’t provide features that allow you to identify your user as a Twitter user; you don’t have the user’s permission to know anything about them at this point.

However, we do have a feature built into the Tweet button whereby you can pass a list of related users in, such that after someone has posted a Tweet, they are prompted within our interface to follow any accounts that they’re not already following.

e.g.

Tweet

That extra attribute will prompt a user to follow me after they Tweet (unless they already do.) You can read all the docs for extra Tweet button configuration here: https://dev.twitter.com/docs/tweet-button


#6

I’m having the same problem. If the user clicks the buttons, logically is giving me permission to know if is following.Is a similar situation as when the user follows me after clicking. I think is a more coherent behaviour to provide a solution for both situations.
For example, we can have that information on the click event, because the user has already clicked don’t you think?
Right now if the user is following my account will be punished with a worse experience on the website.
Does any workaround exist?
Thanks.


#7

hi


#8

following and have followers


#9

#10

#11

#12