有人可以帮我设置 Facebook API 以使用 asp classic 在墙上发布文字、图像和链接吗?
随机脚本很简单,但我似乎无法设置 API。阅读 Facebook 开发人员中的几个文档,但都是针对 PHP 的。
这是我的脚本,如何将图像和文本发布到 Facebook?
dim myFileSys, Folder, FileName, urlpath, num, rsfb, conn, textfb, intGEN
Set myFileSys = Server.CreateObject("Scripting.FileSystemObject")
Set Folder = myFileSys.GetFolder(Server.MapPath("/ftpupload/imagens"))
sub gen_pass(max_num)
dim gen_array(62)
gen_array(0) = "0"
gen_array(1) = "1"
gen_array(2) = "2"
gen_array(3) = "3"
gen_array(4) = "4"
gen_array(5) = "5"
gen_array(6) = "6"
gen_array(7) = "7"
gen_array(8) = "8"
gen_array(9) = "9"
Randomize
do while len(output) < max_num
num = gen_array(Int((9 - 0 + 1) * Rnd + 0))
output = output + num
loop
gen_pass = output
intGEN = CInt("2")
End sub
sub radm
call gen_pass(max_num)
For each file in Folder.Files
if num="" then
num="0"
else
num=num+1
end if
if num=intGEN then
FileName = file.name
end if
next
end sub
do while filename=""
call radm
loop
urlpath = "/ftpupload/imagens/"&filename
response.write urlpath
set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "Driver={MYSQL ODBC 5.1 DRIVER};Server=localhost;Port=3306;Database=fbposter;Uid=root;Pwd=1234;"
conn.Open()
Set rsfb = conn.Execute("Select * From facetext ORDER BY RAND() LIMIT 0,1")
if rsfb.eof then
textfb=rsfb.text
end if
Set myFileSys = nothing
set folder = nothing
set FileName = nothing
set urlpath = nothing
set num = nothing
set rsfb = nothing
set textfb = nothing
set intGEN = nothing
conn.close