Create your own WordPress shortcode that pulls posts from facebook page

Hello there! In the same vein as our previous post that shows how you could create your own shortcode to pull tweets from a user, we’ve decided to make a similar post that shows how you could pull content from a facebook page and integrate it into your WordPress site. Sometimes it makes more sense to create custom shortcode in WordPress as opposed to creating a full on WordPress plugin. One might consider it overkill to create a WordPress plugin to accommodate integrating a feed such as this. If you envision needing a visual interface to change options such as styling, css and Facebook API keys then you might want to go the plugin route. Creating shortcode is a very efficient and lean way to accomplish full WordPress customization and integration without the overhead that may be required to create a custom WordPress plugin. First things first is we want […]

Create your own wordpress shortcode to pull tweets from a user

Hello! I’m of the opinion that it is better to code your own functions, shortcode and templates to accomplish even simple things within content management systems, as opposed to downloading a free plugin to accomplish the same task. You might be asking “Why not just download a plugin? Its much easier!”. Well that may be true in the short term, but there are many reasons why investing a little bit of extra time to develop a solution in wordpress yourself is better in the long run. I’ll go into the reasoning first and then I’ll get into how we created our own shortcode to pull tweets from a twitter user. Security Security is more important than anything else. When you use someone else’s WordPress plugin to accomplish a task, you are putting all your faith and trust in that developer’s ability to develop a solution that adheres to security best […]

Use PHP to send APNS iOS and GCM Android push notifications

Hello! Through our own internal projects it has become a requirement in the past to implement a system that integrates with a mobile application. Specifically we have implemented systems that send out push notifications to iOS and Android based devices. The conditions through which we would be sending the notifications are somewhat irrelevant, though it is important to indicate in this post that we are parsing a database of device IDs and tokens in order to build an array of devices to submit to the function that actually handles the push notifications. This means that the workflow for this type of integration would involve someone downloading an application on their iOS or Android device that requests their permission to send push notifications. Once permissions are given, the application will send the device key to our systems which will then record it in a database for further use. For APNS (Apple […]

Ajax Long Polling to your RESTful API

Hello! Whether your developing a mobile or web based application, keeping on top of constantly changing data is a challenge on its own. Sometimes its necessary to make repeated calls to your API to pull updates at regular intervals. We wrote a previous blog post describing how to use Ajax to pull JSON data via a RESTful web API (click here to read it). Somewhat extending that sentiment a bit, we would like to walk through the process of creating an Ajax “polling” process that repeatedly polls the API to pull data over and over again. This will allow you to receive, process and manipulate or display the data as it changes. The context through which we are using this process is to display changes made to a google map via geo-location updates to a centralized API server that processes updates and returns them to the end users. This particular […]

Use PHP to set up a RESTful API with simple authentication

Hello! It is sometimes necessary to bridge different web applications together in order to transmit or receive information and process it. One scenario could be a mobile application that connects to a web service to pull or push data in order to update the app or provide “real time” services with centralized data. One of the PHP frameworks we have been working with lately is the aptly named Slim. The Slim framework is a very lean PHP framework that allows for a straight forward path to creating the commonly needed building blocks to produce dynamic web services. First, before we do anything, it would be ideal to set up a web site to host the Slim based API service. In the interest of security it is a good idea to force SSL for all requests. That means you will have to purchase an SSL certificate for your website. This will […]