Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

update javascript sdk to 2.x call #538

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions facebook.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,14 @@ 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 );

$args = array(
'xfbml' => true
'xfbml' => true,
'version' => 'v2.3'
);
if ( is_admin() ) {
$args['status'] = true;
Expand Down