Facebook Pixel

Automate Facebook Posts Using the Facebook API

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

Graphic of a district attorney professional clicking a button on a social media software app.
Client: El Dorado County District Attorney

Date: October, 2017

Technologies: PHP, MSSQL, Windows Service, Facebook API

El Dorado County District Attorney logo

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.

Facebook logo and Facebook developer icon

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.
Photo of El Dorado DA's Facebook page using Capitol Tech Solution's automated posts using the Facebook API

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.

El Dorado DA Logo

Richard Pesce

Assistant DA

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 goal at Capitol Tech Solutions is to be your trusted, long-term digital partner. We believe in working with you to develop a solution that will not only help you today, but into the future.

Articles You May Find Helpful

Do you want to improve the speed of your website and increase your user traffic?

Contact Capitol Tech Solutions to find out how we can start improving your business’s User Experience Today!

(916) 443-5395

    Pin It on Pinterest