How to Interact with 3rd Party Systems Using Your WP Site
- December 29, 2016
- Leave a comment
It’s not uncommon to pair your website so that it can interact with third party systems like Facebook, Amazon, EventBrite, etc. The common approach for PHP based web applications is to use methods such as cURL or file_get_contents.
Similarly, you could also apply these methods when integrating your WordPress site with a 3rd party system. However, when interacting with external systems using WordPress features and functions is preferable.
The following WP functions are used to get and post data from external systems:
- wp_remote_get( $url, $args );
- wp_remote_request( $url, $args );
- wp_remote_post( $url, $args );
The target URL of the external system and the parameters are specified in the arguments of these functions.