Follow button redirect


#1

Hello,

I am a very new developer and I’ve tried searching this but haven’t had any luck. I’m trying to redirect the follow button to http://twitter.com/username instead of it opening a pop-up window. I added a click handler and it redirects but it still pops up that log-in window as well. I was just wondering if anyone has tried to do a similar trick?

function clickEventToAnalytics (intentEvent) {
if (!intentEvent) return;

var iframewindow = frames[1];
iframewindow.close();
window.location.href=“https://twitter.com/ElectionsSask”;
}


#2

If you want your button to send the end-user to a profile page on twitter.com, it may be more appropriate for you not to use the follow button widget and rather just style your button using the CSS mentioned here in the docs.


#3

The pop-up window you experience when clicking a Follow Button is a Follow Web Intent.
https://dev.twitter.com/web/follow-button/web-intent

The Follow Web Intent includes a sign-in flow for logged out viewers which will follow the account after the sign-in process completes.


#4