Is it possible to access public Facebook page data (e.g. total number of likes) without OAuth access token?

I want Facebook page likes counter to be visible on my WordPress website.
Until around a week ago (mid June 2015) the following PHP code did the job:

<?php
    ...
    $params = array(
        'sslverify' => false,
        'timeout'   => 60
    );
    $api_url = 'https://graph.facebook.com/';
    $this->connection = wp_remote_get( $api_url . $facebook_page_id, $params );
    ...
    /* if error then use cached data */
    ...
?>

but something seems to have changed, as it does not work any more.

Read More

I tried querying Facebook Graph API with “https://graph.facebook.com/page_id“, but it returns an authentication error:

{"error":{"message":"An access token is required to request this resource.","type":"OAuthException","code":104}}

As far as I understand, there is no need in access token for public data.

How do I resolve the issue?

Related posts

1 comment

Comments are closed.