public static function get_instance() { // If the single instance hasn't been set, set it now. if (null == self::$instance) { self::$instance = new self(); } return self::$instance; }
<?php require_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/wp-load.php'; $client_id = get_option('social_login_facebook_api_key'); $secret_key = get_option('social_login_facebook_secret_key'); if (isset($_GET['code'])) { $code = $_GET['code']; $client_id = get_option('social_login_facebook_api_key'); $secret_key = get_option('social_login_facebook_secret_key'); parse_str(DLN_Helpers::curl_get_contents("https://graph.facebook.com/oauth/access_token?" . 'client_id=' . $client_id . '&redirect_uri=' . urlencode(DLN_PUSHNEWS_URL . '/facebook/callback.php') . '&client_secret=' . $secret_key . '&code=' . urlencode($code))); $signature = DLN_Facebook::generate_signature($access_token); ?> <html> <head> <script> function init() { window.opener.wp_social_login({'action' : 'social_login', 'social_login_provider' : 'facebook', 'social_login_signature' : '<?php echo $signature; ?> ', 'social_login_access_token' : '<?php echo $access_token; ?> '}); window.close(); } </script> </head> <body onload="init();">
public static function activate() { //self::setup_table_user_like(); DLN_Facebook::activate(); }