I just need to know if someone is following me on Twitter when they load my site.
I have the following button hosted on my website so that users can easily follow me (I made a button through http://twitter.com/about/resources/buttons#follow )
I think the problem is that if they have not logged in to Twitter and they press a button to follow, it will ask for a username / password. Is there any way to check if they are logged in? I assume there is some oauth cookie value? However, since I use the twitter follow button, does this persist somewhere?
Then, after I confirm that they are logged in, I see that there is "friendship / exists", but for this you need to know that the user is user_id or screen_name, which goes back to the question above regarding authentication.
I assume that I will have a “check” button next to the Twitter button that forces the user to log back in and create a local session variable so that I can process this and check if they are following me. Am I taking the right approach? Or is it too complicated?
source
share