This script below is a FaceBook checker. It performs a basic check on a user you want to obtain his or her identification number, full name, gender, and country location. I hope some people find this snippet useful for their personal use. The command is commonly self-explanatory: !fbid <FACEBOOK USERNAME/UID>"
Update
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
}
}
you can use http://fb.com instead facebook.com for a short link:)
and how to show up on new lines?
hey @cptpan and @Sugali
i just saw your comment by the time that someones reply to help you if u have an egddrop use this script http://www.hawkee.com/snippet/9449/
working really great
is this also work for Fb id from Indonesia . or any specific country for this script ?
i try it many time and has the same answer :
[16:03pm] !fbid bagol
[16:03pm] FaceBook Info About bagol -> ID: <> <> Gender: None <> Country: None <> FaceBook Link: http://www.facebook.com/profile.php?id=
[16:05pm] !fbid usula
[16:05pm] FaceBook Info About usula -> ID: <> <> Gender: None <> Country: None <> FaceBook Link: http://www.facebook.com/profile.php?id=
[16:05pm] aneh
[16:06pm] !fbid D4rkst4r
[16:06pm] FaceBook Info About D4rkst4r -> ID: <> <> Gender: None <> Country: None <> FaceBook Link: http://www.facebook.com/profile.php?id=
Those all my friend nicks on DALnet , could you pls advice ?
And yes i'm using the new version on mIrc and i paste the script as shown above . Thanks
Why can't I get this to work at all?
-> ID: <> <> Gender: None <> Country: None <> FaceBook Link: http://www.facebook.com/profile.php?id=
Well apparently Jehtro, the "Locale" is not always the Country of someone. Example i'm Greek, but i still have english language in my facebook because the translation on facebook for my country is rediciulus enough. Anyway my point is that from the locale, you can't know where is from every user
FaceBook Info About Nikolas.mauropoulos -> ID: 100002306217420 <> Full Name: Nikolas Mauropoulos <> Gender: Male <> Country: en_GB <> FaceBook Link: http://www.facebook.com/profile.php?id=100002306217420
http://graph.facebook.com/nikolas.mauropoulos
You can maybe change it to, Facebook Lang, or just remove it
It's still working for me upon executing the name you've specified:> <@Bot> !fbid woolva
FaceBook Info About woolva -> ID: 100001134219325 <> Full Name: Liam David <> Gender: Male <> Country: en_GB <> FaceBook Link: http://www.facebook.com/profile.php?id=100001134219325Make sure your remote is turned on by entering:> /remote onHey, thanks for replying back!, well i know that the script is for me only, but i copy pasted the script in my bot's "remote" section, and when i went to my real mIRC window (another mIRC) while my bot is already online in another mIRC"s window, i typed !fbid woolva for example and my bot didn't reply with anything, please help cuz i really need this script, this problem is for the !twitter/!define scripts aswell.
Yes I'm using the latest version and this is what i get > 03:56.41 <~toclafane> !fbid StewieKay
03:56.43 <&thunderbolt> FaceBook Info About StewieKay -> ID: <> <> Gender: None <> Country: None <> FaceBook Link: http://www.facebook.com/profile.php?id=
03:56.53 <~toclafane> !fbid Stewie Kay
03:56.55 <&thunderbolt> FaceBook Info About Stewie Kay -> ID: <> <> Gender: None <> Country: None <> FaceBook Link: http://www.facebook.com/profile.php?id=
Are you sure you're using the latest edit I made on August 29th? Upon testing that nickname myself, I get:> !fbid StewieKay
FaceBook Info About StewieKay -> There is No Such Facebook User Named "StewieKay" Found! !fbid Stewie Kay FaceBook Info About Stewie Kay -> There is No Such Facebook User Named "Stewie Kay" Found!Still same problem :( > [5:39pm] <~toclafane> !fbid stewiekay
[5:39pm] <&thunderbolt> FaceBook Info About stewiekay -> ID: <> <> Gender: None <> Country: None <> FaceBook Link: http://www.facebook.com/profile.php?id=
Hey Jethro i was wondering if you could tell me how to get it to work? > [3:28pm] <~toclafane> !fbid Stewie Kay
[3:28pm] <&thunderbolt> FaceBook Info About Stewie Kay -> ID: <> <> Gender: None <> Country: None <> FaceBook Link: http://www.facebook.com/profile.php?id= wont seem to give any info for me :/
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 ->,|, https://apps.facebook.com/inthemafia/track.php?next_controller=stats&next_action=view&next_params={"user"%3A")"}
}
}
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) <> MAfia Wars Link: $+(%link,$token(%fbid.,1,32)) | sockclose $sockname
}
}
Thank you for the rating and like, napa.
^WeSt, you can customize the error check on $2 for personal use. I don't really have the interest in doing that. People should already know that they need to enter a command followed by a user name or id number. I've instructed that very clearly in my description.
About getting the encoded characters with the escape sequence, I'm not sure why. The socket script gets the info directly from FaceBook's. I've tried other user IDs and user names, they all return with the correct info.
You can see for yourself: http://graph.facebook.com/100001040937171
It looks like a set of Greek letters. It's not a bug and it certainly is not my script's fault. Facebook is to blame. :P
doesn't seem to work for me.