This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Search facebook profiles from MirC to TCL Help

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
Z
Zecca93
Voice
Posts: 13
Joined: Thu Apr 26, 2012 9:09 pm

Search facebook profiles from MirC to TCL Help

Post by Zecca93 »

Can someone plz help and turn this to tcl . Thanks


Code: Select all

on *:sockopen:fbid~*:{
  if ($sockerr) { $2-3 Socket Connection Error! | return }
  tokenize 124 $sock($sockname).mark 
  var %fbid = sockwrite -nt $sockname
  %fbid GET $+(/,$1) HTTP/1.1 | %fbid Connection: close
  %fbid Host: $+($sock($sockname).addr,$str($crlf,2))
}
on $*:text:/^!fbid\s(.*)/iS:*:{ 
  if (!$($+(%,control,.,$site,.,#,.,$network),2)) {
    inc -u5 $+(%,control,.,$site,.,#,.,$network)
    var %1 = $regml(1), %f = $+(fbid~,$ticks)
    sockopen %f graph.facebook.com 80 
    sockmark %f $+($remove(%1,$chr(32)),|,.msg $iif(#,#,$nick),|,$&
      FaceBook Info About %1 ->,|,http://www.facebook.com/profile.php?id=)
  }
}
on *:sockread:fbid~*:{
  tokenize 124 $sock($sockname).mark | var %link = $4 | sockread &fbsockreader 
  var %fb = $bvar(&fbsockreader,1-).text | if ($sockerr) { $2-3 Socket Reading Error! | return }
  elseif (error isin %fb) { $2-3 There is No Such Facebook User Named $qt($1) Found! }
  else { noop $regex(%fb,/"id"(.*)/) | var %fbid. = $regsubex($remove($regml(1),:,$&
      $chr(44),$chr(125)),/""|"/g,$chr(32)) | $remove($2-10,%link) ID: $token(%fbid.,1,32) $&
      <> $replace($token(%fbid.,2-4,32),name,Full Name:) <> Gender: $&
      $iif($regex($token(%fbid.,4-,32),/gender\s(\S+)/),$regsubex($regml(1),/^(.)/,$&
      $upper(\1)),None) <> Country: $iif($regex($token(%fbid.,4-,32),/locale\s(\S+)/),$&
      $regml(1),None) <> FaceBook Link: $+(%link,$token(%fbid.,1,32)) | sockclose $sockname
  }
}
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

From the forum rules, you agree to when you registered on this forum...


>>> This is an Eggdrop/TCL related forum, Neither ask for mIRC Scripts Nor post a new topic for any (mIRC) assistance.


In short... this thread should be locked, junked, similar
i
iRoc

Post by iRoc »

Code: Select all

package require http
#############################

bind pub - !getid proc:fbid

proc proc:fbid {nick uhost hand chan arg} {
  set tok [http::geturl http://graph.facebook.com/$arg]
  set data [http::data $tok]
  
  regexp -nocase {"id":"(.*?)",} $data -> fbogid
  regexp -nocase {"name":"(.*?)",} $data -> fbogname
 

  http::cleanup $tok
  putserv "PRIVMSG $chan :01\[04FaceBook Info\]: >>> 01\[04FaceBook Name\]: $fbogname >>> 1\[04ID\]: $fbogid"
  putserv "PRIVMSG $chan :01\[04FaceBook Link\]: http:\/\/www.facebook.com\/profile.php?id=$fbogid" 
}
##############################
# ----------
putlog "Facebook ID TCL Script adapted by Denver Freeburn of JimpWare, for Frederik Originally coded by Jethro"
# ----------
Z
Zecca93
Voice
Posts: 13
Joined: Thu Apr 26, 2012 9:09 pm

Hmm

Post by Zecca93 »

[18:16:57] Tcl error [proc:fbid]: can't read "fbogname": no such variable
error on ID

[18:18:26] Tcl error [proc:fbid]: Illegal characters in URL path
error on Name :/ can anyone solve this?
Post Reply