[Windows Mobile Development and Hacking General] imbunned:
Thanks to joe_coolish for XDAFacebook..

i made a script for this app.

now, you can online watch or download video from facebook, dailymotion and youtube with this app.

install XDAFacebook

install TCPMP player(needed)

install CorePlayer(recomended)

that's all

note: if you have non-engilish rom, go to \Windows\ , copy XDAFacebook.lnk and paste to \Windows\Start Menu\Programs, after installation

defaultbrowser=regread("hkcr", "http\shell\open\command", "default")

tcpmpdir=regread("hklm", "software\apps\TCPMP The Core Pocket Media Player", "installdir")

if(regkeyexists("hklm", "software\apps\TCPMP The Core Pocket Media Player")=false)

message("TCPMP Player Kayit Defterinde bulunamadi. Yuklu degilse yukleyin, Yukluyse Tekrar Yukleyin^NL^TCPMP Install Directory Regkey Not Found. Please Install Or Reinstall", "imbunned")
endif

regwritestring("hkcr", "http\shell\open\command", "default", """".tcpmpdir."\player.exe"" %1")

coredir=regread("hklm", "software\apps\CoreCodec CorePlayer", "installdir")

if(regkeyexists("hklm", "software\apps\CoreCodec CorePlayer")=true and regread("hkcr", "m3ufile\shell\open\command", "default") ne """".coredir."\player.exe"" %1")

regwritestring("hkcr", "m3ufile\shell\open\command", "default", """".coredir."\player.exe"" %1")
endif

player=systempath("programsmenu") \ "TCPMP.lnk"
if(fileexists(systempath("programsmenu") \ "TCPMP.lnk")=false)
message("TCPMP Player Programlar Menusunde Gorunmuyor^NL^TCPMP Player Not Found in Programs Menu", "imbunned")
endif
player2=systempath("programsmenu") \ "CorePlayer.lnk"
dorothy=systempath("programsmenu") \ "Dorothy Browser.lnk"
uzard=systempath("programsmenu") \ "uZardWebP.lnk"

while Procexists XDAFacebook.exe

if(wndactive("Error")=true)
a=screenwidth()
b=screenheight()
a=a/2
b=b/2

setcliptext(windowtext(a, b))
kill "player.exe"

showwaitcursor
call imbunned
endif
sleep 1000

endwhile

if(procexists("XDAFacebook.exe")=false)
regwritestring("hkcr", "http\shell\open\command", "default", defaultbrowser)
endif

sub imbunned
x=cliptext()

if(Find(x, "youtube.com/watch")<>0)
call youtube
hidewaitcursor
if(fileexists(systempath("programsmenu") \ "CorePlayer.lnk")=false)
message("Youtube CorePlayer gerektirir ve CorePlayer Programlar Menusunde Gorunmuyor^NL^For Youtube Rtsp File, please install CorePlayer. It's Not Found in Programs Menu", "imbunned")
else
link=readfile("\m3u.m3u")
link=split(link, "^NL^")
link=link[1]
run(player2, link)
endif
if(question("Videoyu HD olarak indirmek ister misiniz?^NL^Do You Want Download This Video 'HD Quality' ?", "imbunned")=1)
run("iexplore.exe", cliptext())
endif

elseif(Find (x, "dailymotion.com/video")<>0)
call dailymotion
hidewaitcursor
run("\m3u.m3u")
if(question("Videoyu indirmek ister misiniz?^NL^Do You Want Download This Video?", "imbunned")=1)
run("iexplore.exe", link)
endif

elseif(find(x, "facebook.com/video")<>0)
call facebook
hidewaitcursor
run("\m3u.m3u")

if(question("Videoyu indirmek ister misiniz?^NL^Do You Want Download This Video?", "imbunned")=1)
run("iexplore.exe", link)
endif

elseif(find(x, ".")<>0)
hidewaitcursor
x=cliptext()
x=part(x, "http://", 2)
x=part(x, "Unknown", 1)
switch(question("Dorothy Browser ile acmak icin YES, UzardWeb icin NO^NL^For Dorothy press Yes^NL^UzardWeb, Press No", "imbunned", "YesNoCancel"))
case(yes)
Run(dorothy, x)
case(no)
run(uzard, x)
endswitch

endif
endsub

sub dailymotion
x=cliptext()
x=part(x, "http://", 2)
x=part(x, "Unknown", 1)
a=readfile("http://".x)
a=part(a, "sdURL%22%3A%22", 2)
a=part(a, "%22", 1)

a=replace(a, "%5C%2F", "/")
a=replace(a, "%3F", "?")
a=replace(a, "%3A", ":")
link=replace(a, "%3D", "=")
writefile("\m3u.m3u", link)
endsub

sub facebook
x=cliptext()
id=part(x, "v=", 2)
id=part(id, "#", 1)
id=part(id, "&", 1)
flash="http://www.facebook.com/video/video.php?v=".id
link=readfile(flash)
foreach x in split(link, "addVariable", true)

if(find(x, ".mp4")<>0 and find(x, "lowqual")<>0)
x=part(x, "lowqual_src"", """, 2)
x=part(x, """", 1)
x=replace(x, "http\u00253A\u00252F\u00252F", "http://")
x=replace(x, "u00252F", "")
x=replace(x, "\u00253F", "?")
x=replace(x, "\u00253D", "=")
x=replace(x, "\u002526", "&")
x=replace(x, "\", "/")

elseif(find(x, ".mp4")<>0 and find(x, "video_src")<>0)
x=part(x, "video_src"", """, 2)
x=part(x, """", 1)
x=replace(x, "http\u00253A\u00252F\u00252F", "http://")
x=replace(x, "u00252F", "")
x=replace(x, "\u00253F", "?")
x=replace(x, "\u00253D", "=")
x=replace(x, "\u002526", "&")
x=replace(x, "\", "/")
link=x
endif
endforeach
if(link eq "")
call facebook2
else
writefile("\m3u.m3u", link)
endif
endsub

sub facebook2
x=cliptext()

id=part(x, "v=", 2)
id=part(id, "#", 1)
id=part(id, "&", 1)
flash="http://www.flashvideodownloader.org/download2.php?u=http://www.facebook.com/video/video.php?v=".id
link=readfile(flash)
link=part(link, "r2""><a href=", 2)
link=part(link, " title", 1)
link=part(link, """", 2)
link=part(link, """", 1)
link=replace(link, "u00252F", "")
link=replace(link, "\", "/")
link=replace(link, "http/u00253A//", "http://")
if(link eq "")
call facebook
else
writefile("\m3u.m3u", link)
endif
endsub

sub youtube

delete("\m3u.m3u")
x=cliptext()
x=part(x, "http://", 2)
x=part(x, " ", 1)
x=part(x, "Unknown", 1)
x=part(x, "v=", 2)
delete("\m3u.m3u")

a=readfile("http://www.youtube.com/get_video_info?&video_id=".x)
a=replace(a, "%2F", "/")
a=replace(a, "%3F", "?")
a=replace(a, "%3D", "=")
a=replace(a, "%26", "&")
a=replace(a, "%252", "%2")
a=replace(a, "%253", "%3")
a=replace(a, "%C3", "o")
a=replace(a, "%3A", ":")

foreach c in split(a, "http://", true)
if(find(c, "itag=18")>0)
c=part(c, "%7", 1)
c=part(c, "%2C5", 1)
setcliptext(c)
endif
endforeach

b=readfile("http://m.youtube.com/setpref?gl=US&client=mv-google&hl=en&pref=serve_hq&value=on&next=watch?gl=US&client=mv-google&hl=en&rl=yes&v=/".x)
b=readfile("http://m.youtube.com/watch?gl=US&client=mv-google&hl=en&rl=yes&v=".x)
foreach link in split(b, "rtsp://", true)
if(find(link, ".3gp"))
link=part(link, ".3gp", 1)
link="rtsp://".link.".3gp"
writefile("\m3u.m3u", link."^NL^", true)
endif
endforeach

hidewaitcursor
endsub

exit