-
-
Save jo-snips/5602670 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// use this method to replace the orininal in v1.0.5 (line 273 in the-events-calendar-facebook-importer.php) | |
function get_facebook_photo( $object_id ) { | |
$api_url = $this->build_url_with_access_token( $object_id . '/', array( 'fields' => 'cover', 'return_ssl_resources' => 1 ) ); | |
$api_request = $this->json_retrieve( $api_url ); | |
$new_path = $api_request->cover->source; | |
$get_photo = wp_remote_get( $api_request->cover->source ); | |
// setup return object | |
$photo['url'] = $new_path; | |
$photo['source'] = $get_photo['body']; | |
return apply_filters( 'tribe_fb_get_facebook_photo', $photo, $api_url, $api_request ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment