Jump to content
UBot Underground

Post to Facebook wall


Recommended Posts

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

Link to post
Share on other sites

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")

Link to post
Share on other sites

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

Link to post
Share on other sites

useragent as safari has always worked well for me

Enjoy 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")
        }
    }
}

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...