Hack Forums
[.NET] [How To] Click The "Follow" Button On Twitter - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] [How To] Click The "Follow" Button On Twitter (/showthread.php?tid=1214280)



[How To] Click The "Follow" Button On Twitter - PURP - Apr 14, 2011

So I have been trying to figure this out for a while now and finally got it to work so I thought I would post it here as well.

Code:
PHP Code

<?php 
Private Sub follow()
        Try
            
Dim col As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("div")
            For 
Each elem As HtmlElement In col
                
If elem.GetAttribute("classname").Contains("button profile-follow-button") Then
                    elem
.InvokeMember("click")
                
End If
            
Next
        
Catch ex As Exception
        End 
Try
    
End Sub 

If this has been posted before let me know and I will delete this thread.

Thanks is appreciated.