Open Graph for Facebook, Google+ and Twitter Card Tags - Version 2.1.4.4

Version Description

  • Added the fb_og_update_cache_url filter so that developers can add their Facebook App ID and Secret to the URL when trying to update/clear cache on Facebook - Thanks @l3lackcat
Download this release

Release Info

Developer webdados
Plugin Icon Open Graph for Facebook, Google+ and Twitter Card Tags
Version 2.1.4.4
Comparing to
See all releases

Code changes from version 2.1.4.3 to 2.1.4.4

admin/class-webdados-fb-open-graph-admin.php CHANGED
@@ -235,7 +235,7 @@ class Webdados_FB_Admin {
235
  if (get_post_status($post_id)=='publish' && intval($this->options['fb_adv_notify_fb'])==1) {
236
  $status = 0;
237
  $error = false;
238
- $fb_debug_url='https://graph.facebook.com/?id='.urlencode(get_permalink($post_id)).'&scrape=true&method=post';
239
  $response = wp_remote_get($fb_debug_url);
240
  if ( is_wp_error($response) ) {
241
  $this->update_status = -1;
@@ -283,7 +283,7 @@ class Webdados_FB_Admin {
283
  case '1':
284
  ?>
285
  <div class="updated">
286
- <p><?php _e('Facebook Open Graph Tags cache updated/purged.', 'wonderm00ns-simple-facebook-open-graph-tags'); ?> <a href="https://www.facebook.com/sharer.php?u=<?php echo urlencode(get_permalink($post->ID));?>" target="_blank"><?php _e('Share this on Facebook', 'wonderm00ns-simple-facebook-open-graph-tags'); ?></a></p>
287
  </div>
288
  <?php
289
  break;
235
  if (get_post_status($post_id)=='publish' && intval($this->options['fb_adv_notify_fb'])==1) {
236
  $status = 0;
237
  $error = false;
238
+ $fb_debug_url = apply_filters( 'fb_og_update_cache_url', 'https://graph.facebook.com/?id='.urlencode(get_permalink($post_id)).'&scrape=true&method=post' );
239
  $response = wp_remote_get($fb_debug_url);
240
  if ( is_wp_error($response) ) {
241
  $this->update_status = -1;
283
  case '1':
284
  ?>
285
  <div class="updated">
286
+ <p><?php _e('Facebook Open Graph Tags cache updated/purged.', 'wonderm00ns-simple-facebook-open-graph-tags'); ?> <a class="button button-small" style="margin: 0px 1em;" href="https://www.facebook.com/sharer.php?u=<?php echo urlencode(get_permalink($post->ID));?>" target="_blank"><?php _e('Share this on Facebook', 'wonderm00ns-simple-facebook-open-graph-tags'); ?></a></p>
287
  </div>
288
  <?php
289
  break;
public/class-webdados-fb-open-graph-public.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * @package Facebook Open Graph, Google+ and Twitter Card Tags
4
- * @version 2.1.4.3
5
  */
6
 
7
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
1
  <?php
2
  /**
3
  * @package Facebook Open Graph, Google+ and Twitter Card Tags
4
+ * @version 2.1.4.4
5
  */
6
 
7
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://blog.wonderm00n.com/2011/10/14/wordpress-plugin-simple-face
4
  Tags: facebook, open graph, open graph protocol, share, social, meta, rss, twitter card, twitter, schema, google+, g+, google, google plus, image, like, seo, search engine optimization, woocommerce, yoast seo, wordpress seo, woocommerce, subheading, php7
5
  Requires at least: 4.5
6
  Tested up to: 4.9
7
- Stable tag: 2.1.4.3
8
  Inserts Facebook Open Graph, Google+/Schema.org, Twitter and SEO Meta Tags into your WordPress Website for more efficient sharing results.
9
 
10
  == Description ==
@@ -110,6 +110,11 @@ If this is a new post and it's the first time you're saving it, the error is "no
110
  If this is not a new post and it's not the first time you're saving it, and if this happens always, then maybe your server does not support calling remote URLs with PHP and you should disable the "Try to update Facebook Open Graph Tags cache when saving the post" option. In that scenario we recommend you to use the [Facebook Sharing Debugger](https://developers.facebook.com/tools/debug/) to `Scrape Again` each time you update your post.
111
  Sometimes the plugin just can't update the Facebook cache itself and you may need to do it manually on the link provided above.
112
 
 
 
 
 
 
113
  = Can this plugin get content from "random plugin"? =
114
 
115
  If there's a popular plugin you think we could get content from to use on the meta tags, use the support forum to tell us that.
@@ -136,6 +141,9 @@ We DO NOT provide email support for this plugin. If you send us an email asking
136
 
137
  == Changelog ==
138
 
 
 
 
139
  = 2.1.4.3 =
140
  * Added a "Share this on Facebook" button to the "Post updated" notice
141
  * Fixed some URLs and links from http:// to https://
4
  Tags: facebook, open graph, open graph protocol, share, social, meta, rss, twitter card, twitter, schema, google+, g+, google, google plus, image, like, seo, search engine optimization, woocommerce, yoast seo, wordpress seo, woocommerce, subheading, php7
5
  Requires at least: 4.5
6
  Tested up to: 4.9
7
+ Stable tag: 2.1.4.4
8
  Inserts Facebook Open Graph, Google+/Schema.org, Twitter and SEO Meta Tags into your WordPress Website for more efficient sharing results.
9
 
10
  == Description ==
110
  If this is not a new post and it's not the first time you're saving it, and if this happens always, then maybe your server does not support calling remote URLs with PHP and you should disable the "Try to update Facebook Open Graph Tags cache when saving the post" option. In that scenario we recommend you to use the [Facebook Sharing Debugger](https://developers.facebook.com/tools/debug/) to `Scrape Again` each time you update your post.
111
  Sometimes the plugin just can't update the Facebook cache itself and you may need to do it manually on the link provided above.
112
 
113
+ = Can I authenticate the call to Facebook, with my own app, when trying to update the cache, so I get rid of the "An access token is required to request this resource" error? =
114
+
115
+ Yes, you can. Create a Facebook app and then use the `fb_og_update_cache_url` filter, like in this [code snippet](https://gist.github.com/webdados/32f2669fbe7653520664be410e5a03b2)
116
+ Do NOT ask us support on this. This is an advanced feature for developers only.
117
+
118
  = Can this plugin get content from "random plugin"? =
119
 
120
  If there's a popular plugin you think we could get content from to use on the meta tags, use the support forum to tell us that.
141
 
142
  == Changelog ==
143
 
144
+ = 2.1.4.4 =
145
+ * Added the `fb_og_update_cache_url` filter so that developers can add their Facebook App ID and Secret to the URL when trying to update/clear cache on Facebook - Thanks [@l3lackcat](https://profiles.wordpress.org/amirullahmn)
146
+
147
  = 2.1.4.3 =
148
  * Added a "Share this on Facebook" button to the "Post updated" notice
149
  * Fixed some URLs and links from http:// to https://
wonderm00n-open-graph.php CHANGED
@@ -1,14 +1,14 @@
1
  <?php
2
  /**
3
  * @package Facebook Open Graph, Google+ and Twitter Card Tags
4
- * @version 2.1.4.3
5
  */
6
  /*
7
  Plugin Name: Facebook Open Graph, Google+ and Twitter Card Tags
8
  Plugin URI: https://www.webdados.pt/produtos-e-servicos/internet/desenvolvimento-wordpress/facebook-open-graph-meta-tags-wordpress/
9
  Description: Inserts Facebook Open Graph, Google+/Schema.org, Twitter Card and SEO Meta Tags into your WordPress Blog/Website for more effective and efficient Facebook, Google+ and Twitter sharing results. You can also choose to insert the "enclosure" and "media:content" tags to the RSS feeds, so that apps like RSS Graffiti and Twitterfeed post the image to Facebook correctly.
10
 
11
- Version: 2.1.4.3
12
  Author: Webdados
13
  Author URI: https://www.webdados.pt
14
  Text Domain: wonderm00ns-simple-facebook-open-graph-tags
@@ -18,7 +18,7 @@ WC tested up to: 3.2
18
 
19
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
20
 
21
- define( 'WEBDADOS_FB_VERSION', '2.1.4.3' );
22
  define( 'WEBDADOS_FB_PLUGIN_NAME', 'Facebook Open Graph, Google+ and Twitter Card Tags' );
23
  define( 'WEBDADOS_FB_W', 1200 );
24
  define( 'WEBDADOS_FB_H', 630 );
1
  <?php
2
  /**
3
  * @package Facebook Open Graph, Google+ and Twitter Card Tags
4
+ * @version 2.1.4.4
5
  */
6
  /*
7
  Plugin Name: Facebook Open Graph, Google+ and Twitter Card Tags
8
  Plugin URI: https://www.webdados.pt/produtos-e-servicos/internet/desenvolvimento-wordpress/facebook-open-graph-meta-tags-wordpress/
9
  Description: Inserts Facebook Open Graph, Google+/Schema.org, Twitter Card and SEO Meta Tags into your WordPress Blog/Website for more effective and efficient Facebook, Google+ and Twitter sharing results. You can also choose to insert the "enclosure" and "media:content" tags to the RSS feeds, so that apps like RSS Graffiti and Twitterfeed post the image to Facebook correctly.
10
 
11
+ Version: 2.1.4.4
12
  Author: Webdados
13
  Author URI: https://www.webdados.pt
14
  Text Domain: wonderm00ns-simple-facebook-open-graph-tags
18
 
19
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
20
 
21
+ define( 'WEBDADOS_FB_VERSION', '2.1.4.4' );
22
  define( 'WEBDADOS_FB_PLUGIN_NAME', 'Facebook Open Graph, Google+ and Twitter Card Tags' );
23
  define( 'WEBDADOS_FB_W', 1200 );
24
  define( 'WEBDADOS_FB_H', 630 );