K,,

ive tried and tried now for 3 weeks,, googled everything i can think of,,
im going to you guys now for help,,

what im trying to do is programaticly click the unfollow button in a twitter profile

i use to be able to do this easily but not it seems they hid the button or i am just
doing something wrong,

first i'll give you the source code of the page,, then the stuff i tried, or
some of the stuff i tried.

IF SOMEONE CAN LOGONTO TWITTER AND TAKE A LOOK AT ANYONES PROFILE AND THE UNFOLLOW
BUTTON IT WOULD BE MORE THEN APPRECIATED big time,,

i have tried and tried,,

HTML
<td class="user-actions-outer">
<ul class="user-actions">
<li class="list-menu menu">
<button class="btn" title=""><b></b><i></i></button>
</li>
<li class="action-menu menu">

<button class="btn clicked" value="Actions"><i></i></button>
<ul class="round" style="display: block;">
<li class="mention"><a href="/?status=%40"><i></i>Mention <span>Loqiitaa_</span></a></li>
<li class="direct-message"><a href="/direct_messages/create/"><i></i>Direct message <span>Loqiitaa_</span></a></li>
<li class="follow"><a href="/friendships/create/"><i></i>Follow <span>Loqiitaa_</span></a></li>
<li class="unfollow"><a href="/friendships/destroy/"><i></i>Unfollow <span>Loqiitaa_</span></a></li>

<li class="block"><a href="/blocks/create/"><i></i>Block <span>Loqiitaa_</span></a></li>
<li class="unblock"><a href="/blocks/destroy/"><i></i>Unblock <span>Loqiitaa_</span></a></li>


code i tried,,


i put the text box's where i keep trying different variations to see if they work

Dim v_htmlElement1 As System.Windows.Forms.HtmlElement
        Dim v_htmlDocument As System.Windows.Forms.HtmlDocument = WebBrowser1.Document


        Try
            For Each v_htmlElement As System.Windows.Forms.HtmlElement In v_htmlDocument.GetElementsByTagName(TextBox118.Text)


                'Try

                If (Microsoft.VisualBasic.CompilerServices.Operators.ConditionalCompareObjectEqual(Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(CType(v_htmlElement.DomElement, mshtml.IHTMLTableCell), Nothing, "classname", _
                        New Object() {}, Nothing, Nothing, Nothing), TextBox119.Text, False)) AndAlso (Microsoft.VisualBasic.Strings.InStr(v_htmlElement.Parent.OuterHtml, ">TextBox120.Text<", Microsoft.VisualBasic.CompareMethod.[Binary]) <= 0) Then
                    v_htmlElement1 = v_htmlElement.GetElementsByTagName("TextBox121.Text")(0)
                    v_htmlElement1.InvokeMember("click")
                    ' v_htmlElement1.Focus()
                    Dim v_htmlElement2 As System.Windows.Forms.HtmlElement = v_htmlElement.Parent.GetElementsByTagName("TextBox121.Text")(0)
                    v_htmlElement2.InvokeMember("click")
                    v_htmlElement2 = v_htmlElement.Parent.GetElementsByTagName("TextBox121.Text")(1)
                    v_htmlElement2.InvokeMember("click")

                    'v_htmlElement2 = v_htmlElement.Parent.GetElementsByTagName("td")(2)
                    'v_htmlElement2.Style = "background-color:#ffffff"
                    'v_htmlElement1.Focus()

                    ' v_htmlElement1.Focus()
                    'Try

                    v_htmlElement.Focus()
                    'Catch

                    ' End Try
                End If
                'Catch
                'End Try
                'v_htmlElement1.Focus()
                'TextBox16.Focus()
                ' Sleep(500)

            Next v_htmlElement
        Catch
        End Try

I updated this other code i tried below,, didnt work,

Please,, if you have a second,
IF SOMEONE CAN LOGONTO TWITTER AND TAKE A LOOK AT ANYONES PROFILE AND THE UNFOLLOW
BUTTON IT WOULD BE MORE THEN APPRECIATED big time,,

here is a twitter username and pass to try
Tamiko_K_Sariah
b91a835

Dim v_htmlElement1 As System.Windows.Forms.HtmlElement
        Dim v_htmlDocument As System.Windows.Forms.HtmlDocument = WebBrowser1.Document

        For Each v_htmlElement As System.Windows.Forms.HtmlElement In v_htmlDocument.GetElementsByTagName(TextBox118.Text)

            Dim v_htmlElement2 As System.Windows.Forms.HtmlElement = v_htmlElement.Parent.GetElementsByTagName("action-menu menu")(0)
                v_htmlElement2.InvokeMember("click")

        Next v_htmlElement

I've tried alot more but this is the simplest one i started with,, just cant seem
to do it.

This article has been dead for over six months. Start a new discussion instead.