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