Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/facebook/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Facebook页面更新脚本_Facebook_Greasemonkey - Fatal编程技术网

Facebook页面更新脚本

Facebook页面更新脚本,facebook,greasemonkey,Facebook,Greasemonkey,我有一个greasemonkey脚本,它试图在facebook页面加载时更新状态 但当我尝试提交时,我得到的信息是: “此状态更新似乎为空。请写些什么或 附加链接或照片以更新您的状态。“ 我猜我绕过了一些输入验证例程,当一个真正的用户在状态中输入时,该例程被调用 这就是我一直在尝试的。 考虑FB页面: 有什么线索吗 问候,, Manoj假设您正在facebook的“主页”上运行脚本,请将您的状态更新设置为名为“xhpc_消息”的隐藏输入的值 function setmsg() { textHol

我有一个greasemonkey脚本,它试图在facebook页面加载时更新状态

但当我尝试提交时,我得到的信息是:

“此状态更新似乎为空。请写些什么或 附加链接或照片以更新您的状态。“

我猜我绕过了一些输入验证例程,当一个真正的用户在状态中输入时,该例程被调用

这就是我一直在尝试的。 考虑FB页面:

有什么线索吗

问候,,
Manoj

假设您正在facebook的“主页”上运行脚本,请将您的状态更新设置为名为“xhpc_消息”的隐藏输入的

function setmsg()
{
textHolder.focus();
var vntext=textHolder.value;
textHolder.value = postvalue;
textHolder.focus();
postbutton = document.getElementsByClassName( "_42ft _4jy0 _11b _4jy3 _4jy1" )[0];
postbutton.focus();
textHolder.focus();
setTimeout(postmsg, 4000); // Give the link in post value load.
}

function postmsg()
{
textHolder.focus();
textHolder = document.getElementsByClassName( "uiTextareaAutogrow input mentionsTextarea textInput" )[0];
textHolder.value = postvalue1 + "\n" +  postvalue2; // set the value again just in case that helps...

textHolder.focus();
postbutton.click();
}


setTimeout(setmsg, 1000); // give a sec for the page to load
//set input value 
document.getElementsByName('xhpc_message')[0].value = 'yourstatusupdategoeshere';

//submit button click
document.getElementsByClassName('_42ft _4jy0 _11b _4jy3 _4jy1 selected')[0].click()