WordPress.org

Support

Support » Plugins and Hacks » [Resolved] SSL Cert error when invoking sfc_remote from localhost

[Resolved] SSL Cert error when invoking sfc_remote from localhost

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Samuel Wood (Otto)

    @otto42

    WordPress.org Tech Dude

    When you remote_get to an SSL URL, then it will perform a certificate check (this is Curl doing that). 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 remote_get to make it ignore the certification verification.

    Thanks for the quick response Samuel.

    The sslverify=>false setting works well, and I made it pass the first wp_remote_get call. After the call, $resp[“body’] comes back with:

    access_token=…bunch-of-stuff…&expires=3940

    which appears to contain more than just the access_token. I found I had to strip out “expires=3940” before the code goes into the second wp_remote_get that pulls down $data.

    I’ve only just started on FB’s APIs so let me know if I’m doing something wrong! Thanks again.

    Kevin

    Plugin Author Samuel Wood (Otto)

    @otto42

    WordPress.org Tech Dude

    That is a query string format. Easiest way to deal with it is to pass it through wp_parse_args(). This will convert it to an array with the access_token and the expires parameter as separate entries in the array.

    Also, access tokens are like passwords. Don’t post ’em publicly. I removed the one you posted above. 🙂

    Thanks again Samuel!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] SSL Cert error when invoking sfc_remote from localhost’ is closed to new replies.