Custom Facebook Feed - Version 1.2.8

Version Description

  • Fixed bug in specifying the number of posts to display
Download this release

Release Info

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

Code changes from version 1.2.7 to 1.2.8

Files changed (2) hide show
  1. README.txt +4 -5
  2. custom-facebook-feed.php +9 -2
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
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
@@ -60,10 +60,6 @@ This plugin only allows you to display text updates from your feed. To display p
60
61
It sure is. Unlike other Facebook plugins which use iframes to embed your feed into your page once it's loaded, the Custom Facebook Feed uses PHP to embed your feed content directly into your page. This adds dynamic, search engine crawlable content to your site.
62
63
- = Can I prevent my comments on posts from displaying in the feed? =
64
-
65
- Yep. Comments will show up if you use the Access Token from an account which has adminstrative rights to your page (such as an owner or administrator). To prevent your comments showing up you need to sign up for a new Facebook account which is not associated with your page, register as a developer with this new account, and then use that Access Token to display your feed.
66
-
67
== Screenshots ==
68
69
1. Feed displayed in a page or post. By default the feed inherits your theme's default styles and is completely responsive.
@@ -74,6 +70,9 @@ Yep. Comments will show up if you use the Access Token from an account which ha
74
75
== Changelog ==
76
77
= 1.2.7 =
78
* Prevented likes and comments by the page author showing up in the feed
79
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.8
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
60
61
It sure is. Unlike other Facebook plugins which use iframes to embed your feed into your page once it's loaded, the Custom Facebook Feed uses PHP to embed your feed content directly into your page. This adds dynamic, search engine crawlable content to your site.
62
63
== Screenshots ==
64
65
1. Feed displayed in a page or post. By default the feed inherits your theme's default styles and is completely responsive.
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
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
7
Author: Smash Balloon
8
Author URI: http://smashballoon.com/
9
License: GPLv2 or later
@@ -61,13 +61,15 @@ function display_cff($atts) {
61
}
62
63
//Get the contents of a Facebook page
64
- $FBpage = @file_get_contents('https://graph.facebook.com/' . $page_id . '/posts?access_token=' . $access_token . '&limit=' . $atts['show']);
65
66
//Interpret data with JSON
67
$FBdata = json_decode($FBpage);
68
69
//Create HTML
70
$content = '<div id="cff">';
71
foreach ($FBdata->data as $news ) {
72
73
//Explode News and Page ID's into 2 values
@@ -76,6 +78,11 @@ function display_cff($atts) {
76
//Check whether it's a status (author comment or like)
77
if ($news->type !== 'status') {
78
//If it isn't then create the post
79
//Start the container
80
$content .= '<div class="cff-item">';
81
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.8
7
Author: Smash Balloon
8
Author URI: http://smashballoon.com/
9
License: GPLv2 or later
61
}
62
63
//Get the contents of a Facebook page
64
+ $FBpage = @file_get_contents('https://graph.facebook.com/' . $page_id . '/posts?access_token=' . $access_token);
65
66
//Interpret data with JSON
67
$FBdata = json_decode($FBpage);
68
69
//Create HTML
70
$content = '<div id="cff">';
71
+ //Limit var
72
+ $i = 0;
73
foreach ($FBdata->data as $news ) {
74
75
//Explode News and Page ID's into 2 values
78
//Check whether it's a status (author comment or like)
79
if ($news->type !== 'status') {
80
//If it isn't then create the post
81
+
82
+ //Only create posts for the amount of posts specified
83
+ if ( $i == $atts['show'] ) break;
84
+ $i++;
85
+
86
//Start the container
87
$content .= '<div class="cff-item">';
88