• Hi,

    I am writing a plugin that needs to get some basic public info from Facebook. I take the JSON returned and strip out the info I need. Simple.

    Unfortunately the plugin call to get the FB data only works on my local stack, it doesn’t work on the hosting company server.

    I have tried a cURL call:

    `$ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $fb_url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false);
    $fb_json = curl_exec($ch);
    curl_close($ch);

    and a WordPress API call:

    $x = wp_remote_retrieve_body( wp_remote_get( "https://graph.facebook.com/nike" ));

    to try to get the info. Both work on my local XAMPP install but neither work on the hosting company.

    Anyone any ideas why this would happen? The guys at the hosting company say they can’t help until I give them some error info but the calls simply return bool false so not much help.

    Pulling my hair out!

  • The topic ‘Plugin accessing Facebook PUBLIC info’ is closed to new replies.