Skip to content

Commit

Permalink
fixes in Facebook_Page_Stream widget
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriuzdrobau committed Dec 30, 2014
1 parent 5c8a86a commit c48ae2f
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
if ( defined( 'FW' ) && ! empty( fw()->extensions->get( 'social-facebook' ) ) ) {
if ( defined( 'FW' ) && function_exists('fw_ext_social_facebook_graph_api_explorer') ) {

class Widget_Facebook_Page_Stream extends WP_Widget {

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit c48ae2f

Please sign in to comment.