Jump to content
Fórum Script Brasil
  • 0
Sign in to follow this  
Ted k'

Classe que resgata os Dados do Usuário do Twitter


class UserTwitter
private objXMLDOM
private raiz, i
public nome, screen_name, location
public profile_image_url, url
public followers_count, friends_count
public favourites_count, statuses_count
public time_zone, profile_background_color
public profile_text_color, profile_link_color
public profile_sidebar_fill_color, profile_sidebar_border_color
public profile_background_image_url

public sub LerXML()
set objXMLDOM = server.createObject("MSXML2.DOMDocument.3.0")
objXMLDOM.async = false
objXMLDOM.setProperty "ServerHTTPRequest", true
objXMLDOM.validateOnParse = false

set raiz = objXMLDOM.getElementsByTagName("*")

for i = 0 to raiz.length - 1
select case (raiz.item(i).nodeName)
case ("name")                             : tw.nome                             = raiz.item(i).text
case ("screen_name")                     : tw.screen_name                     = raiz.item(i).text
case ("location")                         : tw.location                         = raiz.item(i).text
case ("profile_image_url")                 : tw.profile_image_url                 = raiz.item(i).text
case ("url")                             : tw.url                             = raiz.item(i).text
case ("followers_count")                 : tw.followers_count                 = raiz.item(i).text
case ("friends_count")                     : tw.friends_count                     = raiz.item(i).text
case ("favourites_count")                 : tw.favourites_count                 = raiz.item(i).text
case ("statuses_count")                 : tw.statuses_count                 = raiz.item(i).text
case ("time_zone")                         : tw.time_zone                         = raiz.item(i).text
case ("profile_background_image_url")    : tw.profile_background_image_url    = raiz.item(i).text
case ("profile_background_color")         : tw.profile_background_color         = ucase(raiz.item(i).text)
case ("profile_text_color")                : tw.profile_text_color                = ucase(raiz.item(i).text)
case ("profile_link_color")                : tw.profile_link_color                = ucase(raiz.item(i).text)
case ("profile_sidebar_fill_color")     : tw.profile_sidebar_fill_color     = ucase(raiz.item(i).text)
case ("profile_sidebar_border_color")     : tw.profile_sidebar_border_color     = ucase(raiz.item(i).text)
end select
set objXMLDOM = nothing
end sub

end class

set tw = new UserTwitter



Baixe o Arquivo completo AQUI

Edited by Ted k'

Share this post

Link to post
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

Cloud Computing

  • Forum Statistics

    • Total Topics
    • Total Posts
  • Create New...