Custom Facebook Feed - Version 2.4.1.2

Version Description

  • Updated to be compatible with Facebook API version 2.6
Download this release

Release Info

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

Code changes from version 2.4.1.1 to 2.4.1.2

Files changed (2) hide show
  1. README.txt +4 -1
  2. custom-facebook-feed.php +19 -19
README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: smashballoon
3
  Tags: Facebook, Facebook feed, Facebook posts, Facebook wall, Facebook events, Facebook page, Facebook group, Facebook groups, Facebook fans, Facebook likes, Facebook followers, Facebooks, Face book, posts, Facebook postings, Facebook feeds, Facebook pages, Facebook Like Box, Facebook plugin, Facebook plug-in, Facebook walls, Facebook hashtag, Facebook embed, Customizable Facebook Feed, custom, customizable, seo, responsive, mobile, social media
4
  Requires at least: 3.0
5
  Tested up to: 4.5
6
- Stable tag: 2.4.1.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -361,6 +361,9 @@ Credit iMarketing Factory - "The Importance of Facebook for Small Businesses"
361
  9. It's super easy to display your Facebook feed in any page or post
362
 
363
  == Changelog ==
 
 
 
364
  = 2.4.1.1 =
365
  * Fix: Fixed a JavaScript error in the admin area when using WordPress 4.5
366
 
3
  Tags: Facebook, Facebook feed, Facebook posts, Facebook wall, Facebook events, Facebook page, Facebook group, Facebook groups, Facebook fans, Facebook likes, Facebook followers, Facebooks, Face book, posts, Facebook postings, Facebook feeds, Facebook pages, Facebook Like Box, Facebook plugin, Facebook plug-in, Facebook walls, Facebook hashtag, Facebook embed, Customizable Facebook Feed, custom, customizable, seo, responsive, mobile, social media
4
  Requires at least: 3.0
5
  Tested up to: 4.5
6
+ Stable tag: 2.4.1.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
361
  9. It's super easy to display your Facebook feed in any page or post
362
 
363
  == Changelog ==
364
+ = 2.4.1.2 =
365
+ * Updated to be compatible with Facebook API version 2.6
366
+
367
  = 2.4.1.1 =
368
  * Fix: Fixed a JavaScript error in the admin area when using WordPress 4.5
369
 
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 completely customizable Facebook feeds to your WordPress site
6
- Version: 2.4.1.1
7
  Author: Smash Balloon
8
  Author URI: http://smashballoon.com/
9
  License: GPLv2 or later
@@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
  //Include admin
27
  include dirname( __FILE__ ) .'/custom-facebook-feed-admin.php';
28
 
29
- define('CFFVER', '2.4.1.1');
30
 
31
  // Add shortcodes
32
  add_shortcode('custom-facebook-feed', 'display_cff');
@@ -632,21 +632,23 @@ function display_cff($atts) {
632
 
633
  //If there's no Access Token then use a default
634
  $access_token_array = array(
635
- '1489500477999288|KFys5ppNi3sreihdreqPkU2ChIE',
636
- '859332767418162|BR-YU8zjzvonNrszlll_1a4y_xE',
637
- '360558880785446|4jyruti_VkxxK7gS7JeyX-EuSXs',
638
- '1487072591579718|0KQzP-O2E4mvFCPxTLWP1b87I4Q',
639
- '640861236031365|2rENQzxtWtG12DtlZwqfZ6Vu6BE',
640
- '334487440086538|hI_NNy1NvxQiQxm-TtXsrmoCVaE',
641
- '755471677869105|Jxv8xVDad7vUUTauk8K2o71wG2w',
642
- '518353204973067|dA7YTe-k8eSvgZ8lqa51xSm16DA',
643
- '444286039063163|5qkYu2qxpERWO3gcs2f3nxeqhpg',
644
- '944793728885704|XJ6QqKK8Ldsssr4n5Qrs2tVr7rs',
645
- '1444667452511509|wU7tzWiuj6NadfpHfgkIGLGO86o',
646
- '1574171666165548|ZL9tXNXxpnCdAvdUjCX5HtRnsR8'
 
 
 
647
  );
648
- if ($access_token == '' || !$cff_show_access_token) $access_token = $access_token_array[rand(0, 11)];
649
-
650
 
651
  //Check whether a Page ID has been defined
652
  if ($page_id == '') {
@@ -804,8 +806,6 @@ function display_cff($atts) {
804
  //ALL POSTS
805
  if (!$cff_events_only){
806
 
807
- // $cff_posts_json_url = 'https://graph.facebook.com/' . $page_id . '/' . $graph_query . '?access_token=' . $access_token . '&limit=' . $cff_post_limit . '&locale=' . $cff_locale . $cff_ssl;
808
-
809
  $cff_posts_json_url = 'https://graph.facebook.com/' . $page_id . '/' . $graph_query . '?fields=id,from,message,message_tags,story,story_tags,link,source,name,caption,description,type,status_type,object_id,created_time&access_token=' . $access_token . '&limit=' . $cff_post_limit . '&locale=' . $cff_locale . $cff_ssl;
810
 
811
  //Don't use caching if the cache time is set to zero
@@ -1009,7 +1009,7 @@ function display_cff($atts) {
1009
 
1010
  //... and the link is to an album then it most likely has photo attachments
1011
  $albumLinkArr1 = explode('photos/a.', $link);
1012
- $albumLinkArr2 = explode('.', $albumLinkArr1[1]);
1013
 
1014
  //If it has an album link then set the post type to be album
1015
  if( isset($albumLinkArr1[1]) ){
3
  Plugin Name: Custom Facebook Feed
4
  Plugin URI: http://smashballoon.com/custom-facebook-feed
5
  Description: Add completely customizable Facebook feeds to your WordPress site
6
+ Version: 2.4.1.2
7
  Author: Smash Balloon
8
  Author URI: http://smashballoon.com/
9
  License: GPLv2 or later
26
  //Include admin
27
  include dirname( __FILE__ ) .'/custom-facebook-feed-admin.php';
28
 
29
+ define('CFFVER', '2.4.1.2');
30
 
31
  // Add shortcodes
32
  add_shortcode('custom-facebook-feed', 'display_cff');
632
 
633
  //If there's no Access Token then use a default
634
  $access_token_array = array(
635
+ '772762049525257|UksMy-gYmk78WNHVEsimaf8uar4',
636
+ '1611234219197161|PenH1iYmf3CShpuWiLMrP6_0mro',
637
+ '842457575860455|MA2WQAK6MO22mYlD1vAfQmY-jNQ',
638
+ '1598576770461963|t3KRNHf1490G8qEopdGoUiMPJ7I',
639
+ '1774415812787078|3yGpMpgbH-Nte9YHCfVIQ59RIt8',
640
+ '762305090538008|KmVsImjHmaJIPTpII9HyOif3yD0',
641
+ '1741187749472232|b1ZfgQ2OSQZzsQN1lqLn4vjrQV4',
642
+ '1748310315388907|AMSWRHgAoChtXepfsWU0OxKfVbQ',
643
+ '1721409114785415|4dIAXp4_utfqkAJS-9X4OXB6GR4',
644
+ '1609030662756868|nCKsZPN4cI-GsIJsi0DESGGtSgw',
645
+ '1590773627916704|EbgBWG45AVQZdNrwsAnTl_-CW_A',
646
+ '227652200958404|AzHtmm3B080elswwLKJrRCKYpGg',
647
+ '1176842909001332|YIQehZhGPWxqkvmiFn4Klt1PA4U',
648
+ '217933725249790|h4YSEYX71EO_2el93hiT47uyf5g',
649
+ '823681761071502|0oAyJYz-MO-jgr8rI3ftrEcBRiQ'
650
  );
651
+ if ($access_token == '' || !$cff_show_access_token) $access_token = $access_token_array[rand(0, 14)];
 
652
 
653
  //Check whether a Page ID has been defined
654
  if ($page_id == '') {
806
  //ALL POSTS
807
  if (!$cff_events_only){
808
 
 
 
809
  $cff_posts_json_url = 'https://graph.facebook.com/' . $page_id . '/' . $graph_query . '?fields=id,from,message,message_tags,story,story_tags,link,source,name,caption,description,type,status_type,object_id,created_time&access_token=' . $access_token . '&limit=' . $cff_post_limit . '&locale=' . $cff_locale . $cff_ssl;
810
 
811
  //Don't use caching if the cache time is set to zero
1009
 
1010
  //... and the link is to an album then it most likely has photo attachments
1011
  $albumLinkArr1 = explode('photos/a.', $link);
1012
+ if( isset($albumLinkArr1[1]) ) $albumLinkArr2 = explode('.', $albumLinkArr1[1]);
1013
 
1014
  //If it has an album link then set the post type to be album
1015
  if( isset($albumLinkArr1[1]) ){