diff --git a/scratch-parent/inc/widgets/facebook-page-stream/class-widget-facebook-page-stream.php b/scratch-parent/inc/widgets/facebook-page-stream/class-widget-facebook-page-stream.php index 7621f79..a590e3a 100644 --- a/scratch-parent/inc/widgets/facebook-page-stream/class-widget-facebook-page-stream.php +++ b/scratch-parent/inc/widgets/facebook-page-stream/class-widget-facebook-page-stream.php @@ -1,7 +1,7 @@ extensions->get( 'social-facebook' ) ) ) { +if ( defined( 'FW' ) && function_exists('fw_ext_social_facebook_graph_api_explorer') ) { class Widget_Facebook_Page_Stream extends WP_Widget { @@ -34,9 +34,7 @@ function widget( $args, $instance ) { // '1.0' // ); - /* @var $facebook FW_Extension_Social_Facebook */ - $facebook = fw()->extensions->get( 'social-facebook' ); - $result = $facebook->graph_api_explorer( 'GET', $page_id, array( 'fields' => 'posts.limit(' . $number . '){message}' ) ); + $result = fw_ext_social_facebook_graph_api_explorer( 'GET', $page_id, array( 'fields' => 'posts.limit(' . $number . '){message}' ) ); $result = json_decode( $result ); if ( ! empty( $result->posts->data ) ) { $posts = $result->posts->data;