Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Please find this function
- function get_facebook_object( $object_id ) {
- $url = $this->build_url_with_access_token( $object_id );
- return $this->json_retrieve( $url );
- }
- // Amend it as follows
- function get_facebook_object( $object_id ) {
- $url = $this->build_url_with_access_token( $object_id );
- var_dump($url);
- return $this->json_retrieve( $url );
- }
- // Please find this function
- function json_retrieve( $url ) {
- add_filter( 'http_request_timeout', array( $this, 'http_request_timeout' ) );
- return json_decode( wp_remote_retrieve_body( wp_remote_get( $url ) ) );
- remove_filter( 'http_request_timeout', array( $this, 'http_request_timeout' ) );
- }
- // Amend it as follows
- function json_retrieve( $url ) {
- add_filter( 'http_request_timeout', array( $this, 'http_request_timeout' ) );
- $debug = json_decode( wp_remote_retrieve_body( wp_remote_get( $url ) ) );
- print_r($debug);
- return $debug;
- remove_filter( 'http_request_timeout', array( $this, 'http_request_timeout' ) );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement