-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Obrzut wrote:
> What do you mean by screen scraping? Is it because I am taking the
> HTML page and turning it into a XML document?
>
> This is because of OAuth. It uses HTML pages to validate. Perhaps I am
> wrong - but once I use a web browser to validate - I cannot use a TCP
> Client to get the XML because I authenticated via a web browser. When
> I tried to (for example) send the pin back via a HTTP Web Request it
> failed. I am not sure if I am using the OAuth library Interface Class
> I have for VB.NET correctly!?
>
> But, the way I am doing it - I just keep a web browser open to make
> the requests - and use the above code to filter off the XML.
>
> I hope I am not breaking any rules? If Bojan R. wants to help me out
> (he wrote the OAuth library I am using) then I'd much appreciate to do
> it the *right* way.
>
> On Jul 1, 12:27 am, DWRoelands <[email protected]> wrote:
>> I'm curious; why are you screen-scraping an HTML page in a Twitter
>> app?
>>
>> On Jun 30, 4:09 pm, Obrzut <[email protected]> wrote:
>>
>>
>>
>>> Dim w As New System.IO.StreamWriter(fs)
>>>             Page = Page.Replace("&", " ")
>>>             Page = Page.Replace("- <", "<")
>>>             Page = Page.TrimStart(" ")
>>>             w.Write(Page)
>>> This is a better example of code that does what the above code sample
>>> should be doing rather than changing UTF8 to ASCII - I replace a '- <'
>>> with a '<' remove any '&'s and trim the white space. This makes it
>>> sorted for VB.Net whilst preserving most the document text.
You're scraping the PIN from the page, rather than opening the page in
a browser. Just open the page in a browser, and ask the user to input
the PIN from the page. Scraping the PIN out of the page sorta
invalidates the whole purpose of the PIN-based workflow, which is to
give the user an interactive way to talk to the page. When a user
clicks the link that takes them to the URL you get back from
GetAuthorizationLink (), they have to log in to twitter and allow the
app, and only *then* do they get a PIN, not any time before. I've said
it time and again--you have to *open* the page in the browser, only
*then* will you be able to get a PIN from the user. My sample doesn't
explicitly open the URL, since I wanted the sample to be
cross-platform, and there's no portable way to open a URL
(Process.Start (url) won't work on Linux/OS X). I don't know why
you're not following the workflow as I outlined it.

Regards,
Bojan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
iQIcBAEBAgAGBQJKSr1qAAoJEO4IwQyHg9AWqpoP+weYKTZiBEEMg6p78MW2jWqI
ipGKHzlkjTPbiWdalB4F5zpx6fZaGPqLqtJeOuoVjgHxx+cMR/cRE41iU8Ug3C9u
W0eeBBi4Tl0arH01LcLeAEU+fLCNaNRvt2ETj7mK3p29ygmzssHUHPZTu5t2jevO
c/1JmJWagAZqGnyIjWoHkIr8fTIKNfv1+opGAupLMSEnuOcLo3IEXiSBBWRtYEEP
NzbHVGiDo/tq3f1bsuZ9lrCPi+x7Ms9QlCTVdiLw+RY2Pi69+RVoSVkRXg/cnD1e
iV4yYfePLvqQKJl9pO8hzPGQSrOMVOZMNLVoMIdyv/Llv4E07F56ZiE9NeDvvv2i
LQRaoxuVAn2xurIMgotLhHhMTOU64sZWoR5vZkqPm3iRSXVxH7iYiYMnOEHGbaV2
mXAyTok8FVwWMEKkNE4ckqoyugTB5Jv7JF+/WQI1b00sd67a1L6Pn2BqlrzROpI+
Bhul3RcaEzmIyVxg63BeGJC+Fn8rFslUCYxpk/IaQkNU0oZBBwVVzsR37SJd8Y7D
nu7i3xDThdOJ8YH7X7vkfFJP1QauXDW0lprPZQRBl3X4SsbwOO502czMO4WVKOLw
e2aAgCOKlj6GjzIkT3xFRnNfTuBI7D2Whxct3Hp1VY1kSi4oDobKxURVtnutk1uH
Foy+jSCyiGbP3ztpoQf2
=0xtC
-----END PGP SIGNATURE-----

Reply via email to