Are you trying to boost your brandâs visibility on Facebook by engaging with targeted content? This guide will show you how to automate comments on Facebook posts related to specific topics, like âAI Automation.â With Uxerâs AI assistant, you can leave meaningful and personalized comments that resonate with audiences, saving you time while increasing engagement.
Description:
This template automates the process of finding relevant Facebook posts, generating personalized comments using Uxerâs AI Assistant, and interacting with content based on the chosen topic. It ensures that your brand remains visible and engaged with posts that matter to your audience.
How to Use It:
- Copy and paste this template into Uxerâs scenario builder.
- Ensure that you are logged into Facebook in Chrome before running the scenario.
- Save and run the scenario to automatically find relevant Facebook posts and leave personalized comments based on your targeted topic.
Step-by-Step Guide
-
Open Facebook in Browser
This step opens Facebook with incognito mode disabled to ensure the user remains logged into their account.OpenBrowser Chrome "https://www.facebook.com/" -Incognito false
-
Search for Your Targeted Topic
Search for posts that relate to âAI Automation.â Here, the script finds the Facebook search bar, types in the target topic, and hits Enter.Click Text "Search" Write "AI Automation" SendKeys ENTER
-
Navigate to Posts
Click to filter the search results and see only relevant posts. This step uses an anchor algorithm to click the âPostsâ text near the âAllâ option since there may be multiple instances of the word âPostsâ on the page. This ensures that the correct section is selected for viewing posts related to the chosen topic.Click Text "All" > Text "Posts"
-
Click the Recent Posts Toggle
This step clicks the recent posts toggle to display the latest posts.Click Image {ux_facebook_toggle}
-
Scroll to Find Unliked Posts
Scroll through the posts until you find one that has not yet been liked. This ensures that you interact with content that hasnât been engaged with before.Scroll 6 -UntilVisible Image {ux_facebook_like}
-
Click Comment Button
This step clicks the comment button next to the like button that has not been engaged before. Note: if there is no comment button available, the scenario will fail. This requires a more complex solution, which we will address in a future iteration.Click Image {ux_facebook_like} -XMargin 200
-
Move Mouse Over the Post for Scrolling
Move the mouse to 300 pixels above the âComment asâ section for a specific post. This ensures that scrolling happens in the correct section, as the mouse can sometimes be incorrectly positioned. Proper mouse positioning is crucial for the scroll to work effectively.MoveMouseTo Text "Comment as" -YMargin -300 -WhenFails Continue -Retry 2
-
Scroll to View Post in Detail
Scroll up by -4 units to view the upper part of the post in detail. Clicking the comment button moves the comment section to the middle of the page, so scrolling up allows you to see the post more clearly if it is no longer visible on the screen.Scroll -4
-
Generate a Personalized Comment with AskUxer
Use Uxerâs AI assistant to generate a personalized comment that encourages engagement. This command helps you generate a non-generic, engaging comment for a post you havenât liked yet, ensuring the interaction feels organic and meaningful.{Response} = AskUxer "You are viewing a Facebook page with multiple posts. Find the first post without blue 'like' text, meaning it is not liked by me. Don't create a comment about the one I liked; instead, create one for the post I didn't like. Write a personalized, positive, and engaging comment in English based on the content of that post. Highlight key points or achievements and encourage further conversation. Avoid generic responses and ensure the comment reflects that I don't personally know the author. Do not make any statements about actions or promises I cannot fulfill." -UseScreenshot true
-
Post the Comment
Write and submit the generated comment.Write {Response} SendKeys ENTER
-
Scroll Down to Click Like
Scroll down to click the like button we found earlier. Since some comment sections can be opened in new windows, this helps to ensure that the like button we found is visible.Scroll 4 Click Image {ux_facebook_like}
-
Exit Comment Window
Since some comments open in a new window, exit the window by pressing the Escape key.SendKeys ESCAPE
Complete Scenario:
OpenBrowser Chrome "https://www.facebook.com/" -Incognito false
Click Text "Search"
Write "AI Automation"
SendKeys ENTER
Click Text "All" > Text "Posts"
Click Image {ux_facebook_toggle}
Scroll 6 -UntilVisible Image {ux_facebook_like}
Click Image {ux_facebook_like} -XMargin 200
MoveMouseTo Text "Comment as" -YMargin -300 -WhenFails Continue -Retry 2
Scroll -4
{Response} = AskUxer "You are viewing a Facebook page with multiple posts. Find the first post without blue 'like' text, meaning it is not liked by me. Don't create a comment about the one I liked; instead, create one for the post I didn't like. Write a personalized, positive, and engaging comment in English based on the content of that post. Highlight key points or achievements and encourage further conversation. Avoid generic responses and ensure the comment reflects that I don't personally know the author. Do not make any statements about actions or promises I cannot fulfill." -UseScreenshot true
Write {Response}
SendKeys ENTER
Scroll 4
Click Image {ux_facebook_like}
SendKeys ESCAPE
Conclusion
Automating Facebook comments with Uxer allows you to stay active on relevant discussions without having to invest your time in every single interaction. This approach enhances engagement on targeted topics while maintaining authenticity. Use this scenario to grow your audience and build meaningful connections in your niche.
Want more automation guides like this? Let us know what topics youâre interested in, and weâll help you automate them effortlessly!