Automate Facebook Posts Using Facebook API

Automate Facebook Posts Using the Facebook API

Back to software Projects

CTS automates Facebook posts for El Dorado District Attorney, reducing staff time, standardizing posts, and increasing user engagement.
Screenshot of Facebook Automation Application

Client: El Dorado County District Attorney

Date: October, 2017

Technologies: php, MSSQL, Windows Service, Facebook API

El Dorado County District Attorney wants to optimize their social media engagement and streamline the posting process of reoccurring social media posts.

Every day, the El Dorado County District Attorney arrests criminals breaking the law, keeping El Dorado County a safe community. Educating the community on the arrests is an important aspect of the DA’s job, and they realize that many folks get their news via social media. The DA’s office had a previous WordPress plugin that sort of worked, but they had no control over it, and the formatting of the post was unreadable, and left their posts looking unprofessional. Furthermore, when they wanted additional enhancements, the tool didn’t give them the flexibility to provide a custom solution.

Our team of programmers have worked previously with the Facebook API to create custom posts, engagements, and search tools, and knew the task could be completed via the API and some custom PHP code that would run on an automated basis.

Utilize the publicly available Facebook API to automate the social media posting process.

Our team researched the Facebook API options to see what would work best for El Dorado County. Facebooks API is very robust and has many options, including Facebook Login, Analytics, and mobile app integration. But for our project, we want to use the Facebook sharing tools from our own App. This API gives developers the ability to create any post from a custom tool. Developers can share Links, Status updates, and Open Graph Stories. For this project, we suggested sharing a Link with a detailed Status Update would suit their needs.

Our team also researched the best time for the posts. Since these were going out on a regular basis, we determined getting them out just after lunch gave us the highest average click through rate of the post. According to Fast Company, there is a lull in the afternoon where more people are checking their Facebook posts, and our engagement will increase during that time frame. Reaching the maximum user base is critical to us.

Automate data collection via a web crawler

Utilizing PHP, we enhanced a website crawler that pulled the data from an existing website, and stored it into a custom MSSQL database. We automated this process with Windows Task Scheduler to run on an hourly basis, since the source data was not published at the same time every day. While this approach works, it is careful to note we are dependent on a website we don’t control. Therefore, we built a notification system to let us know when the website structure changes so we can modify our scrapping code accordingly.

Utilize custom PHP to call the Facebook API and Share a Link

Since our developers previously had experience writing to the Facebook API, they were able to quickly jump into this task to automate the posts. Once we collected the data in the morning, we called the Facebook API via a Facebook app we created. First, the El Dorado County DA had to install our app so we could post onto their page. Once it was installed, our team was able to call the API and schedule the post first thing in the morning for maximum visibility.

Automated Facebook Posts lead to more user engagement

Through the awareness campaign, combined with our social media teams awareness campaign, we have seen post engagement significantly increase, and website traffic rise. After a week of posts, we shortened the content significantly, which in turn lead to a rise in the click through rate to the website. The automated posts are now averaging nearly 6,000 impressions a day, and the engagement from the community is positive, knowing that the DA is making their community safer. Through the automated facebook posts, they are able to demonstrate all of the great work they are doing.

"Our automated Facebook posts have been a great asset for our social media page and our community. It removes a time consuming process our staff had to do on a regular basis, and didn’t do on weekends. Through the API, we are exploring other ways to effectively communicate to our community."

- Richard Pesce, Assistant DA.

Tell us about your Software Development Project

Need help building custom software for your business? We can help! Tell us a little about more about the difficulties you're having and how custom software can help solve it.

Contact Us
(916) 443-5395