WordPress.org

Forums

Facebook
Avoid (2 posts)

  1. Ryan
    Member
    Posted 2 years ago #

    Installed and went to enter App Id ID and Secret and then selected "save". Nothing happened. Tried a few times. Nothing.

  2. sotaynauan
    Member
    Posted 2 years ago #

    When saving WP will perform a certificate check (to get app access token). If you have not upgraded the certificate lists on your PHP install, this will cause that error.

    You can either update the certification authority lists in your PHP install, or you can add the 'sslverify'=>false flag to the arguments list for wp_remote_get to make it ignore the certification verification.

    Goto line 263 in ../wp-content/plugins/facebook/includes/facebook-php-sdk/class-facebook-wp.php

    ...
    $response = self::handle_response( wp_remote_get( self::$DOMAIN_MAP['graph'] . 'oauth/access_token?' . http_build_query( array( 'client_id' => $app_id, 'client_secret' => $app_secret, 'grant_type' => 'client_credentials' ), '', '&' ), array(
    				'redirection' => 0,
    				'httpversion' => '1.1',
    				'timeout' => 5,
    				'headers' => array( 'Connection' => 'close' ),
    				'user-agent' => self::generate_user_agent(),
    				'sslverify'=>false,
    			) ) );
    ...

    NOTE: You also need to correct at the line 92

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Facebook
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.