From f426152d12aa093075e32985034cc0e36a9e85dd Mon Sep 17 00:00:00 2001 From: Chuck Reynolds Date: Wed, 1 Apr 2015 12:08:32 -0700 Subject: [PATCH 1/2] update javascript sdk to 2x call Update all.js and all/debug.js 1.x calls to new 2.x sdk.js and sdk/debug.js calls to eliminate pending doom on April 30 2015. Reference: https://developers.facebook.com/docs/javascript/quickstart/v2.3 --- facebook.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/facebook.php b/facebook.php index ee191e0b..8268a900 100644 --- a/facebook.php +++ b/facebook.php @@ -259,7 +259,7 @@ public function register_js_sdk() { global $wp_scripts; $handle = 'facebook-jssdk'; // match the Facebook async snippet ID to avoid double load - wp_register_script( $handle, ( is_ssl() ? 'https' : 'http' ) . '://connect.facebook.net/' . $this->locale . '/' . ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? 'all/debug.js' : 'all.js' ), array(), null, true ); + wp_register_script( $handle, ( is_ssl() ? 'https' : 'http' ) . '://connect.facebook.net/' . $this->locale . '/' . ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? 'sdk/debug.js' : 'sdk.js' ), array(), null, true ); // register the script but take it back with an async load add_filter( 'script_loader_src', array( 'Facebook_Loader', 'async_script_loader_src' ), 1, 2 ); From 3e9775149a2dbe1f6564dd6ba8a24a85f0a87d2c Mon Sep 17 00:00:00 2001 From: Chuck Reynolds Date: Wed, 1 Apr 2015 12:21:37 -0700 Subject: [PATCH 2/2] include javascript sdk 2.x version at FB.init in addition to my previous pull request changing all.js to sdk.js we should, according to the docs, include the version on FB.ini too. --- facebook.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/facebook.php b/facebook.php index 8268a900..de6cf256 100644 --- a/facebook.php +++ b/facebook.php @@ -265,7 +265,8 @@ public function register_js_sdk() { add_filter( 'script_loader_src', array( 'Facebook_Loader', 'async_script_loader_src' ), 1, 2 ); $args = array( - 'xfbml' => true + 'xfbml' => true, + 'version' => 'v2.3' ); if ( is_admin() ) { $args['status'] = true;