Custom Facebook Feed - Version 1.3.2

Version Description

  • Fix: Now using the built-in WordPress HTTP API to get retrieve the Facebook data
Download this release

Release Info

Developer smashballoon
Plugin Icon 128x128 Custom Facebook Feed
Version 1.3.2
Comparing to
See all releases

Code changes from version 1.3.1 to 1.3.2

Files changed (2) hide show
  1. README.txt +4 -1
  2. custom-facebook-feed.php +8 -5
README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: smashballoon
3
  Tags: facebook, custom, customizable, feed, seo, search engine, responsive, mobile, shortcode, social, status
4
  Requires at least: 3.0
5
  Tested up to: 3.5.1
6
- Stable tag: 1.3.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -70,6 +70,9 @@ It sure is. Unlike other Facebook plugins which use iframes to embed your feed i
70
 
71
  == Changelog ==
72
 
 
 
 
73
  = 1.3.1 =
74
  * Fix: Fixed issue with certain statuses not displaying correctly
75
 
3
  Tags: facebook, custom, customizable, feed, seo, search engine, responsive, mobile, shortcode, social, status
4
  Requires at least: 3.0
5
  Tested up to: 3.5.1
6
+ Stable tag: 1.3.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
70
 
71
  == Changelog ==
72
 
73
+ = 1.3.2 =
74
+ * Fix: Now using the built-in WordPress HTTP API to get retrieve the Facebook data
75
+
76
  = 1.3.1 =
77
  * Fix: Fixed issue with certain statuses not displaying correctly
78
 
custom-facebook-feed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Custom Facebook Feed
4
  Plugin URI: http://smashballoon.com/custom-facebook-feed
5
  Description: Add a completely customizable Facebook feed to your WordPress site
6
- Version: 1.3.1
7
  Author: Smash Balloon
8
  Author URI: http://smashballoon.com/
9
  License: GPLv2 or later
@@ -79,11 +79,14 @@ function display_cff($atts) {
79
  return $feedData;
80
  }
81
 
82
- //Get the contents of a Facebook page
83
- $json_object = fetchUrl('https://graph.facebook.com/' . $page_id . '/posts?access_token=' . $access_token);
 
84
 
85
- // If cURL isn't working then use file_get_contents below
86
- // $json_object = @file_get_contents('https://graph.facebook.com/' . $page_id . '/posts?access_token=' . $access_token);
 
 
87
 
88
  //Interpret data with JSON
89
  $FBdata = json_decode($json_object);
3
  Plugin Name: Custom Facebook Feed
4
  Plugin URI: http://smashballoon.com/custom-facebook-feed
5
  Description: Add a completely customizable Facebook feed to your WordPress site
6
+ Version: 1.3.2
7
  Author: Smash Balloon
8
  Author URI: http://smashballoon.com/
9
  License: GPLv2 or later
79
  return $feedData;
80
  }
81
 
82
+ //Get the contents of the Facebook feed using the WP HTTP API
83
+ if( !class_exists( 'WP_Http' ) )
84
+ include_once( ABSPATH . WPINC. '/class-http.php' );
85
 
86
+ $feed_url = 'https://graph.facebook.com/' . $page_id . '/posts?access_token=' . $access_token;
87
+ $request = new WP_Http;
88
+ $result = $request->request( $feed_url );
89
+ $json_object = $result['body'];
90
 
91
  //Interpret data with JSON
92
  $FBdata = json_decode($json_object);