3

When a user which is not logged in to Facebook or Twitter, clicks the like/tweet button, a popup comes up asking the user to log in. This popup is not blocked by popup blockers of any kind. in IE for example, it opens up but anyway IE state a warning to the user. The bottom line is that all buttons probably use the same method. I have a button that people click on it and it should open a similar screen, but it always gets blocked. The button (in JS) works pretty much like FB like button. It checks if the user is logged in. If he does, then send the "like" to the servers. If he does not, then the login popup appears (and gets blocked). So, it is a initiated by a user although not fully direct outcome, since we need to check if he logged in or not. What is best method to do that?

AssafT
  • 97
  • 1
  • 1
  • 7
  • What is the code you use? – epascarello Jan 06 '14 at 18:38
  • 3
    It's not blocked because the popup was caused by the click. If your popup is getting blocked, it's likely that the actual code opening the popup isn't a direct result of the click, but rather, is a result of some asynchronous method that happens after the click completes. – Kevin B Jan 06 '14 at 18:39
  • Here's a related question: http://stackoverflow.com/questions/6192889/legally-avoiding-popup-blocking – Kevin B Jan 06 '14 at 18:42
  • We use the classic window.open('http://www.domain.com') method. @KevinB - It's a direct result of the click done by the user (and it's not spam or advertisement. it's a login screen) – AssafT Jan 07 '14 at 14:43

1 Answers1

2

The Popup Is activated by a click using the like, tweet button and they actually show only 1 popup. If you want, you can try by using only a single popup based on click for your website and you will definitely be able to understand this.

Nitesh Yadav
  • 51
  • 1
  • 9