Version Description
- Fix: Now using cURL instead of file_get_contents to prevent issues with php.ini configuration on some web servers
Download this release
Release Info
Developer | smashballoon |
Plugin | Custom Facebook Feed |
Version | 1.2.9 |
Comparing to | |
See all releases |
Code changes from version 1.2.8 to 1.2.9
- README.txt +10 -7
- custom-facebook-feed.php +21 -3
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.2.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -70,23 +70,26 @@ It sure is. Unlike other Facebook plugins which use iframes to embed your feed i
|
|
70 |
|
71 |
== Changelog ==
|
72 |
|
|
|
|
|
|
|
73 |
= 1.2.8 =
|
74 |
-
* Fixed bug in specifying the number of posts to display
|
75 |
|
76 |
= 1.2.7 =
|
77 |
-
* Prevented likes and comments by the page author showing up in the feed
|
78 |
|
79 |
= 1.2.6 =
|
80 |
-
* Added help link to settings page
|
81 |
|
82 |
= 1.2.5 =
|
83 |
-
* Added clear fix
|
84 |
|
85 |
= 1.2.1 =
|
86 |
-
* Minor bug fixes
|
87 |
|
88 |
= 1.2 =
|
89 |
-
* Added the ability to define a maximum length for both the post title and body text
|
90 |
|
91 |
= 1.0 =
|
92 |
* Launch!
|
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.2.9
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
70 |
|
71 |
== Changelog ==
|
72 |
|
73 |
+
= 1.2.9 =
|
74 |
+
* Fix: Now using cURL instead of file_get_contents to prevent issues with php.ini configuration on some web servers
|
75 |
+
|
76 |
= 1.2.8 =
|
77 |
+
* Fix: Fixed bug in specifying the number of posts to display
|
78 |
|
79 |
= 1.2.7 =
|
80 |
+
* Tweak: Prevented likes and comments by the page author showing up in the feed
|
81 |
|
82 |
= 1.2.6 =
|
83 |
+
* Tweak: Added help link to settings page
|
84 |
|
85 |
= 1.2.5 =
|
86 |
+
* Fix: Added clear fix
|
87 |
|
88 |
= 1.2.1 =
|
89 |
+
* Fix: Minor bug fixes
|
90 |
|
91 |
= 1.2 =
|
92 |
+
* New: Added the ability to define a maximum length for both the post title and body text
|
93 |
|
94 |
= 1.0 =
|
95 |
* Launch!
|
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.2.
|
7 |
Author: Smash Balloon
|
8 |
Author URI: http://smashballoon.com/
|
9 |
License: GPLv2 or later
|
@@ -60,11 +60,29 @@ function display_cff($atts) {
|
|
60 |
return false;
|
61 |
}
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
//Get the contents of a Facebook page
|
64 |
-
$
|
|
|
|
|
|
|
65 |
|
66 |
//Interpret data with JSON
|
67 |
-
$FBdata = json_decode($
|
68 |
|
69 |
//Create HTML
|
70 |
$content = '<div id="cff">';
|
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.2.9
|
7 |
Author: Smash Balloon
|
8 |
Author URI: http://smashballoon.com/
|
9 |
License: GPLv2 or later
|
60 |
return false;
|
61 |
}
|
62 |
|
63 |
+
// cURL used to get JSON object of feed data
|
64 |
+
function fetchUrl($url){
|
65 |
+
$ch = curl_init();
|
66 |
+
curl_setopt($ch, CURLOPT_URL, $url);
|
67 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
68 |
+
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
|
69 |
+
// Uncomment below if using SSL
|
70 |
+
// curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,false);
|
71 |
+
|
72 |
+
$feedData = curl_exec($ch);
|
73 |
+
curl_close($ch);
|
74 |
+
|
75 |
+
return $feedData;
|
76 |
+
}
|
77 |
+
|
78 |
//Get the contents of a Facebook page
|
79 |
+
$json_object = fetchUrl('https://graph.facebook.com/' . $page_id . '/posts?access_token=' . $access_token);
|
80 |
+
|
81 |
+
// If cURL isn't working then use file_get_contents below
|
82 |
+
// $json_object = @file_get_contents('https://graph.facebook.com/' . $page_id . '/posts?access_token=' . $access_token);
|
83 |
|
84 |
//Interpret data with JSON
|
85 |
+
$FBdata = json_decode($json_object);
|
86 |
|
87 |
//Create HTML
|
88 |
$content = '<div id="cff">';
|