Vijay Pravin 0 Posted December 6, 2013 Report Share Posted December 6, 2013 Hi Friends, I am new to Ubot studio, also I am a non-programmer. I need some assistance in creating a "Post to Facebook Wall" bot. Below is the code but its not working, please someone correct me ui text box("FB Username", #fbuser)ui text box("FB Passwd", #fbpasswd)ui block text("FB Content", #fbcontent)navigate("http://www.facebook.com", "Wait")type text($element offset(<email field>, 0), #fbuser, "Standard")type text($element offset(<password field>, 0), #fbpasswd, "Standard")click(<login button>, "Left Click", "No")wait(5)click(<aria-pressed="true">, "Left Click", "No")type text(<name="xhpc_message_text">, #fbcontent, "Standard")wait(10)click(<class="_42ft _4jy0 _11b _4jy3 _4jy1 selected">, "Left Click", "No") Rgds,Vijay Pravin Quote Link to post Share on other sites
SmokE 1 Posted December 6, 2013 Report Share Posted December 6, 2013 Just add click post button after you type the #fbcontent so it becomes: ui text box("FB Username", #fbuser) ui text box("FB Passwd", #fbpasswd) ui block text("FB Content", #fbcontent) navigate("http://www.facebook.com", "Wait") type text($element offset(<email field>, 0), #fbuser, "Standard") type text($element offset(<password field>, 0), #fbpasswd, "Standard") click(<login button>, "Left Click", "No") wait(5) click(<aria-pressed="true">, "Left Click", "No") type text(<name="xhpc_message_text">, #fbcontent, "Standard") wait(2) click(<innertext="Post">, "Left Click", "No") Quote Link to post Share on other sites
Vijay Pravin 0 Posted December 6, 2013 Author Report Share Posted December 6, 2013 Still it's not posting....Can someone please help me to click "Post" Quote Link to post Share on other sites
Vijay Pravin 0 Posted December 7, 2013 Author Report Share Posted December 7, 2013 Is there any solution to fix this Issue? Quote Link to post Share on other sites
Edward_2 85 Posted December 7, 2013 Report Share Posted December 7, 2013 Buttons can be a Beach sometimes... try this instead of click(<class="_42ft _4jy0 _11b _4jy3 _4jy1 selected">, "Left Click", "No") click($element offset(<class="_42ft _42fu _11b selected _42g-">, 1), "Left Click", "No") Best of luck Quote Link to post Share on other sites
blumi40 222 Posted December 8, 2013 Report Share Posted December 8, 2013 forget all the focus and click thingsplay with {TAB} and {ENTER} in your textfield 1 Quote Link to post Share on other sites
Ptrick125 45 Posted December 9, 2013 Report Share Posted December 9, 2013 A simple precaution is to change your user agent, and if you're doing something with Facebook, I would highly advise changing your user agent. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted December 9, 2013 Report Share Posted December 9, 2013 useragent as safari has always worked well for meEnjoy the below. Works perfectly for me in any language. define status poster login and post facebook { clear list(%messages) if($comparison(#status poster message, "!=", $nothing)) { then { add item to list(%messages, #status poster message, "Delete", "Global") } else { add list to list(%messages, $list from file(#messagefile), "Delete", "Global") } } navigate("https://www.facebook.com/", "Wait") wait for browser event("Everything Loaded", "") wait(2) if($exists($element offset(<email field>, 0))) { then { wait for element($element offset(<password field>, 0), 30, "Appear") wait for element(<id="loginbutton">, 30, "Appear") type text($element offset(<email field>, 0), #facebook email, "Standard") wait(1) type text($element offset(<password field>, 0), #facebook password, "Standard") click(<id="loginbutton">, "Left Click", "No") wait for browser event("Page Loaded", 10) wait(5) if($exists(<email field>)) { then { type text(<email field>, #facebook email, "Standard") type text(<password field>, #facebook password, "Standard") click(<id="loginbutton">, "Left Click", "No") wait for browser event("Page Loaded", 10) wait(5) } else { } } wait for element(<innertext=w"*pdate *tatus">, 30, "Appear") } else { } } if($exists(<name="xhpc_message">)) { then { wait(3) set(#status, "posting to facebook", "Global") type text(<name="xhpc_message">, $spin($random list item(%messages)), "Standard") wait(3) click(<outerhtml=w"<button value=\"1\" class=\"*\" type=\"submit\">Post*</button>">, "Left Click", "No") wait for browser event("Everything Loaded", "") wait($rand(5, 10)) } else { set(#status, "failed facebook login", "Global") } }} Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.