WD Facebook Feed – Custom Facebook Feed Plugin - Version 1.0.37

Version Description

  • Changed: API requests reduced from frontend
  • Changed: Use another token if API returns any kind of error
  • Removed: Likes temporarily not displayed
  • Fixed: Unnecessary requests from feeds list admin screen
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 WD Facebook Feed – Custom Facebook Feed Plugin
Version 1.0.37
Comparing to
See all releases

Code changes from version 1.0.36 to 1.0.37

admin/views/FFWDViewInfo_ffwd.php CHANGED
@@ -246,10 +246,10 @@ class FFWDViewInfo_ffwd
246
  <input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>"/>
247
  <input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc"/>
248
  <input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>"/>
249
- <script>
250
  window.onload = spider_show_hide_weights;
251
  var dropped_ids = [],
252
- ffwd_data = jQuery.parseJSON('<?php echo $this->model->ffwd_objects; ?>');
253
  for (var i = 0; i < ffwd_data.length; i++) {
254
  for (var j = 0; j < ffwd_data[i].length; j++) {
255
  jQuery.getJSON(
@@ -285,7 +285,7 @@ class FFWDViewInfo_ffwd
285
  function createSuccessCallback(i, j) {
286
  return;
287
  }
288
- </script>
289
  </form>
290
  <?php
291
  }
@@ -1072,19 +1072,19 @@ class FFWDViewInfo_ffwd
1072
  for="<?php echo WD_FB_PREFIX; ?>_thumb_comments_no">No</label>
1073
  </td>
1074
  </tr>
1075
- <tr id="<?php echo WD_FB_PREFIX; ?>_tr_thumb_likes">
1076
  <td title="Show likes" class="ffwd_set_l"><label>Show likes: </label></td>
1077
  <td class="ffwd_set_i">
1078
- <input type="radio" name="<?php echo WD_FB_PREFIX; ?>_thumb_likes"
1079
- id="<?php echo WD_FB_PREFIX; ?>_thumb_likes_1" value="1"
1080
- checked="checked" <?php checked($row->thumb_likes, 1) ?> /><label
1081
- for="<?php echo WD_FB_PREFIX; ?>_thumb_likes_yes">Yes</label>
1082
- <input type="radio" name="<?php echo WD_FB_PREFIX; ?>_thumb_likes"
1083
- id="<?php echo WD_FB_PREFIX; ?>_thumb_likes_0"
1084
- value="0" <?php checked($row->thumb_likes, 0) ?> /><label
1085
- for="<?php echo WD_FB_PREFIX; ?>_thumb_likes_no">No</label>
1086
- </td>
1087
- </tr>
1088
  <tr id="<?php echo WD_FB_PREFIX; ?>_tr_thumb_name">
1089
  <td title="Show likes" class="ffwd_set_l"><label>Show name: </label></td>
1090
  <td class="ffwd_set_i">
246
  <input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>"/>
247
  <input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc"/>
248
  <input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>"/>
249
+ <!--<script>
250
  window.onload = spider_show_hide_weights;
251
  var dropped_ids = [],
252
+ ffwd_data = jQuery.parseJSON('<?php /*echo $this->model->ffwd_objects; */?>');
253
  for (var i = 0; i < ffwd_data.length; i++) {
254
  for (var j = 0; j < ffwd_data[i].length; j++) {
255
  jQuery.getJSON(
285
  function createSuccessCallback(i, j) {
286
  return;
287
  }
288
+ </script>-->
289
  </form>
290
  <?php
291
  }
1072
  for="<?php echo WD_FB_PREFIX; ?>_thumb_comments_no">No</label>
1073
  </td>
1074
  </tr>
1075
+ <!--<tr id="<?php /*echo WD_FB_PREFIX; */?>_tr_thumb_likes">
1076
  <td title="Show likes" class="ffwd_set_l"><label>Show likes: </label></td>
1077
  <td class="ffwd_set_i">
1078
+ <input type="radio" name="<?php /*echo WD_FB_PREFIX; */?>_thumb_likes"
1079
+ id="<?php /*echo WD_FB_PREFIX; */?>_thumb_likes_1" value="1"
1080
+ checked="checked" <?php /*checked($row->thumb_likes, 1) */?> /><label
1081
+ for="<?php /*echo WD_FB_PREFIX; */?>_thumb_likes_yes">Yes</label>
1082
+ <input type="radio" name="<?php /*echo WD_FB_PREFIX; */?>_thumb_likes"
1083
+ id="<?php /*echo WD_FB_PREFIX; */?>_thumb_likes_0"
1084
+ value="0" <?php /*checked($row->thumb_likes, 0) */?> /><label
1085
+ for="<?php /*echo WD_FB_PREFIX; */?>_thumb_likes_no">No</label>
1086
+ </td>
1087
+ </tr>-->
1088
  <tr id="<?php echo WD_FB_PREFIX; ?>_tr_thumb_name">
1089
  <td title="Show likes" class="ffwd_set_l"><label>Show name: </label></td>
1090
  <td class="ffwd_set_i">
facebook-feed-wd.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: WD Facebook Feed
5
  * Plugin URI: https://web-dorado.com/products/wordpress-facebook-feed-plugin.html
6
  * Description:WD Facebook Feed is a completely customizable, responsive solution to help you display your Facebook feed on your WordPress website.
7
- * Version: 1.0.36
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -1014,7 +1014,7 @@ if ( !function_exists('wd_bps_install_notice_status') ) {
1014
 
1015
  function ffwd_version() {
1016
 
1017
- $version = '1.0.36';
1018
 
1019
  if ( get_option( 'ffwd_version' ) === false ) {
1020
  add_option( 'ffwd_version', $version );
4
  * Plugin Name: WD Facebook Feed
5
  * Plugin URI: https://web-dorado.com/products/wordpress-facebook-feed-plugin.html
6
  * Description:WD Facebook Feed is a completely customizable, responsive solution to help you display your Facebook feed on your WordPress website.
7
+ * Version: 1.0.37
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
1014
 
1015
  function ffwd_version() {
1016
 
1017
+ $version = '1.0.37';
1018
 
1019
  if ( get_option( 'ffwd_version' ) === false ) {
1020
  add_option( 'ffwd_version', $version );
framework/WDFacebookFeed.php CHANGED
@@ -71,34 +71,35 @@ class WDFacebookFeed {
71
 
72
 
73
  '1795317140689602|e25d547c4f12164254f85eead086b0a7',
74
- '181607922248075|d0787a2cfff89efd23b9fe1ffafa45db',
75
  '1851314935096786|0de2a9ec77d745d6941850696ce166f9',
76
- '1983264355330375|e5c100f6d4b768abb560e7df1771ac89',
77
- '274376249625432|03d7cc70158f4b720a124c11aad5606e',
78
- '927474184059774|ekzzwIV9JnvG-ELYWut9wIvf4Y0',
79
- '157849737751172|1wgUYn-UwVvoiZkvROi7yi2aIRw',
80
- '140081703552|rtuoT3AGRIzb-z_PPUlOnN9iYA0',
81
  '322095208287051|pbCTS6jPuhjR18sl2UPhKQw7eyY',
82
- '1439406912938596|4JDCXisJ2d-1EWeObBt27DybH5c',
83
  '1042396375891598|gn2HiZgDgjTbCMcXsSb6VK91PqM',
84
  '348613608818294|d4gRX7tNppCrI-DrOGof_O8gwvg',
85
- '502797619766223|fuoqcs_7_9HPokY0C296S4VtB0o',
86
  '1591407604237466|cHUFs9XDDJa7LDUW9zBxirwGAHE',
87
- '277269689412168|o3k5mzmHsT-prqc2qizxk_DoXEQ',
88
- '386881278380301|NW_PiECD9TLVe0UNMsB5H9HkPEo',
89
  '697312047120344|p8ST5dkrub6IoBZsClmyRBTScB0',
90
  '1134584793234186|763Jh88I-PuO8_slARazfgucxFg',
91
- '257106408010811|MwCorr7qsyIeU_GjdPFIEw3-_P8',
92
- '1693018934313805|VYDjx69NpsgkDEAm79cYD0fxJBk',
93
- '1298990730176646|rU4QhoOaYPWQng6-k_QdxRoVNaA',
94
  '1788677371359317|UU7yeB5dsKOT8xLsLA9xSNu4OMQ',
95
- '1876405409266356|VT8hdBxkbAf6-PCq-TosrtiMilU',
96
- '128947497630881|rlgLr8wtMUWRw7hbcLcsgoa01-k',
97
- '963645750343660|1mgCt1EhXAI0o51tYpZ7O6dThKM',
98
- '177899259380474|JgdlhmU-J0dq55bKng0xywDIgIo',
99
- '1106367462776766|Pj4xBlwzMH53yCQw7-h_prMExQg',
100
- '131153380694449|jxU6_J0SobvxNG-pzJW8MKsI0w8'
101
- );
 
102
 
103
  protected static $save = true;
104
  protected static $edit_feed = false;
@@ -742,7 +743,7 @@ $ffwd_info_options[$ffwd_option_db] =((isset($_POST[$ffwd_option_db])) ? esc_htm
742
  // Set next page if it exists
743
  $paging = array_key_exists ( 'paging' , $data ) ? $data['paging'] : array();
744
  $next_page = array_key_exists ( 'next' , $paging ) ? $paging['next'] : 0;
745
- $post_data = $data['data'];
746
  foreach($post_data as $next) {
747
  if(strpos($content, $next['type']) === false)
748
  continue;
@@ -1716,23 +1717,21 @@ $ffwd_info_options[$ffwd_option_db] =((isset($_POST[$ffwd_option_db])) ? esc_htm
1716
  }
1717
  }
1718
  if(isset($facebook_graph_results["error"]) && count(self::$access_tokens)>1){
1719
- if(isset($facebook_graph_results['error']['code']) && $facebook_graph_results['error']['code']== 4){
1720
- if (($key = array_search(self::$access_token, self::$access_tokens)) !== false) {
1721
- unset(self::$access_tokens[$key]);
1722
- self::$access_token = null;
1723
- }
1724
- $rand_key = array_rand(self::$access_tokens);
1725
- self::$access_token = self::$access_tokens[$rand_key];
1726
 
1727
- $parts = parse_url($uri);
1728
- $queryParams = array();
1729
- parse_str($parts['query'], $queryParams);
1730
- $queryParams["access_token"] = self::$access_token;
1731
 
1732
- $queryString = http_build_query($queryParams);
1733
- $url = "https://graph.facebook.com".$parts['path'] . '?' . $queryString;
1734
- return self::decap_do_curl($url);
1735
- }
1736
  }
1737
  return $facebook_graph_results;
1738
  }
71
 
72
 
73
  '1795317140689602|e25d547c4f12164254f85eead086b0a7',
74
+ //'181607922248075|d0787a2cfff89efd23b9fe1ffafa45db',
75
  '1851314935096786|0de2a9ec77d745d6941850696ce166f9',
76
+ //'1983264355330375|e5c100f6d4b768abb560e7df1771ac89',
77
+ //'274376249625432|03d7cc70158f4b720a124c11aad5606e',
78
+ //'927474184059774|ekzzwIV9JnvG-ELYWut9wIvf4Y0',
79
+ //'157849737751172|1wgUYn-UwVvoiZkvROi7yi2aIRw',
80
+ //'140081703552|rtuoT3AGRIzb-z_PPUlOnN9iYA0',
81
  '322095208287051|pbCTS6jPuhjR18sl2UPhKQw7eyY',
82
+ //'1439406912938596|4JDCXisJ2d-1EWeObBt27DybH5c',
83
  '1042396375891598|gn2HiZgDgjTbCMcXsSb6VK91PqM',
84
  '348613608818294|d4gRX7tNppCrI-DrOGof_O8gwvg',
85
+ //'502797619766223|fuoqcs_7_9HPokY0C296S4VtB0o',
86
  '1591407604237466|cHUFs9XDDJa7LDUW9zBxirwGAHE',
87
+ //'277269689412168|o3k5mzmHsT-prqc2qizxk_DoXEQ',
88
+ //'386881278380301|NW_PiECD9TLVe0UNMsB5H9HkPEo',
89
  '697312047120344|p8ST5dkrub6IoBZsClmyRBTScB0',
90
  '1134584793234186|763Jh88I-PuO8_slARazfgucxFg',
91
+ //'257106408010811|MwCorr7qsyIeU_GjdPFIEw3-_P8',
92
+ //'1693018934313805|VYDjx69NpsgkDEAm79cYD0fxJBk',
93
+ //'1298990730176646|rU4QhoOaYPWQng6-k_QdxRoVNaA',
94
  '1788677371359317|UU7yeB5dsKOT8xLsLA9xSNu4OMQ',
95
+ //'1876405409266356|VT8hdBxkbAf6-PCq-TosrtiMilU',
96
+ //'128947497630881|rlgLr8wtMUWRw7hbcLcsgoa01-k',
97
+ //'963645750343660|1mgCt1EhXAI0o51tYpZ7O6dThKM',
98
+ //'177899259380474|JgdlhmU-J0dq55bKng0xywDIgIo',
99
+ //'1106367462776766|Pj4xBlwzMH53yCQw7-h_prMExQg',
100
+ //'131153380694449|jxU6_J0SobvxNG-pzJW8MKsI0w8',
101
+
102
+ );
103
 
104
  protected static $save = true;
105
  protected static $edit_feed = false;
743
  // Set next page if it exists
744
  $paging = array_key_exists ( 'paging' , $data ) ? $data['paging'] : array();
745
  $next_page = array_key_exists ( 'next' , $paging ) ? $paging['next'] : 0;
746
+ $post_data = isset($data['data']) ? $data['data'] : array();
747
  foreach($post_data as $next) {
748
  if(strpos($content, $next['type']) === false)
749
  continue;
1717
  }
1718
  }
1719
  if(isset($facebook_graph_results["error"]) && count(self::$access_tokens)>1){
1720
+ if (($key = array_search(self::$access_token, self::$access_tokens)) !== false) {
1721
+ unset(self::$access_tokens[$key]);
1722
+ self::$access_token = null;
1723
+ }
1724
+ $rand_key = array_rand(self::$access_tokens);
1725
+ self::$access_token = self::$access_tokens[$rand_key];
 
1726
 
1727
+ $parts = parse_url($uri);
1728
+ $queryParams = array();
1729
+ parse_str($parts['query'], $queryParams);
1730
+ $queryParams["access_token"] = self::$access_token;
1731
 
1732
+ $queryString = http_build_query($queryParams);
1733
+ $url = "https://graph.facebook.com".$parts['path'] . '?' . $queryString;
1734
+ return self::decap_do_curl($url);
 
1735
  }
1736
  return $facebook_graph_results;
1737
  }
frontend/models/FFWDModelMain.php CHANGED
@@ -51,9 +51,10 @@ class FFWDModelMain {
51
  array($row['from'], '', 'access_token=' . $this->access_token . '&', 'fields=picture,name,link&', '', ''),
52
  $this->graph_url
53
  );
54
- $this->page_user_group = self::decap_do_curl($graph_url_for_page_info);
55
  $this->page_user_group = json_encode($this->page_user_group);
56
  }
 
57
  return $row;
58
  }
59
  public function page_nav($id, $objects_per_page, $ffwd) {
51
  array($row['from'], '', 'access_token=' . $this->access_token . '&', 'fields=picture,name,link&', '', ''),
52
  $this->graph_url
53
  );
54
+ $this->page_user_group = array();//self::decap_do_curl($graph_url_for_page_info);
55
  $this->page_user_group = json_encode($this->page_user_group);
56
  }
57
+ $row["blog_style_likes"] = "0";
58
  return $row;
59
  }
60
  public function page_nav($id, $objects_per_page, $ffwd) {
js/ffwd_frontend.js CHANGED
@@ -578,7 +578,7 @@ function ffwd_fill_likes_blog_style(id_object_id, ffwd, owner_info, ffwd_params,
578
 
579
  var reactions_array={};
580
 
581
- for(var i = 0; i < ids_array.length; i++)
582
  {
583
 
584
  ids=ids_array[i].join(',');
@@ -600,9 +600,7 @@ function ffwd_fill_likes_blog_style(id_object_id, ffwd, owner_info, ffwd_params,
600
 
601
  }
602
  );
603
-
604
-
605
- }
606
 
607
 
608
  for (var i = 0; i < id_object_id.length; i++) {
578
 
579
  var reactions_array={};
580
 
581
+ /* for(var i = 0; i < ids_array.length; i++)
582
  {
583
 
584
  ids=ids_array[i].join(',');
600
 
601
  }
602
  );
603
+ }*/
 
 
604
 
605
 
606
  for (var i = 0; i < id_object_id.length; i++) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: customizable facebook feed, facebook, facebook events, facebook feed, face
4
  Requires at least: 3.4
5
  Requires PHP: 5.2
6
  Tested up to: 4.9
7
- Stable tag: 1.0.36
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -100,8 +100,14 @@ The plugin uses Facebook API to get public data from Facebook. All the received
100
 
101
  == Changelog ==
102
 
 
 
 
 
 
 
103
  = 1.0.36 =
104
- * Changed: Use built-in access tokens if user's token has expired rate limit
105
 
106
  = 1.0.35 =
107
  * Fixed: Crash on front end when API returns error
@@ -374,29 +380,4 @@ The feed might not be working correctly because the page you are trying to displ
374
 
375
  Unfortunately, this cannot be controlled by Facebook Feed WD, since Facebook API does not provide data about pages with restrictions.
376
 
377
- Therefore, please make sure to remove the restrictions, and try again.
378
-
379
-
380
- = Can I have Facebook group or personal profile social feed? =
381
-
382
- Unfortunately, group and profile social feed feature is not available in Facebook Feed WD WordPress plugin anymore.
383
-
384
- Facebook API [has been changed](https://developers.facebook.com/blog/post/2018/04/04/facebook-api-platform-product-changes/) on **April 4th, 2018,** and now it does not allow bringing posts from public groups.
385
-
386
- Additionally, according to Facebook's [privacy policy](https://www.facebook.com/legal/FB_Work_Privacy), unfortunately, it is not possible to create a social feed of a personal profile. Facebook API provides data about public Facebook pages only.
387
-
388
- You can find more information about this [here](https://newsroom.fb.com/news/2018/04/restricting-data-access/).
389
-
390
- We are sorry for any inconvenience these changes may have caused.
391
-
392
- = How can I fix the error concerning application request limit? =
393
-
394
- This error has occurred due to sudden changes in Facebook API. By installing **1.0.35** or higher version of Facebook Feed WD social feed plugin, you can eliminate the error on your WordPress site.
395
-
396
- In case installing the update fails to resolve the issue, please contact our team at support@web-dorado.com.
397
-
398
- = Can I include a likebox with my social feed? =
399
-
400
- If you wish to allow your visitors to like your page from your WordPress site, you can place **Facebook Page Plugin.** It is also commonly called likebox.
401
-
402
- To enable it, open WordPress administrative panel of your website, then edit your Facebook feed. Scroll down to find **Show Page Plugin** option. Enabling this setting will place the likebox of your Facebook page and showcase it with your WordPress facebook feed.
4
  Requires at least: 3.4
5
  Requires PHP: 5.2
6
  Tested up to: 4.9
7
+ Stable tag: 1.0.37
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
100
 
101
  == Changelog ==
102
 
103
+ = 1.0.37 =
104
+ * Changed: API requests reduced from frontend
105
+ * Changed: Use another token if API returns any kind of error
106
+ * Removed: Likes temporarily not displayed
107
+ * Fixed: Unnecessary requests from feeds list admin screen
108
+
109
  = 1.0.36 =
110
+ * Changed: Use built-in access tokens if user's token has expired rate limit
111
 
112
  = 1.0.35 =
113
  * Fixed: Crash on front end when API returns error
380
 
381
  Unfortunately, this cannot be controlled by Facebook Feed WD, since Facebook API does not provide data about pages with restrictions.
382
 
383
+ Therefore, please make sure to remove the restrictions, and try again.