facebookarchive / php-graph-sdk

The Facebook SDK for PHP provides a native interface to the Graph API and Facebook Login. https://developers.facebook.com/docs/php
Other
3.18k stars 1.96k forks source link

Issue in getGraphVersion() in FacebookResponse.php #1064

Open kushal9291 opened 6 years ago

kushal9291 commented 6 years ago

In getHeaders() response key is in small case. ["facebook-api-version"]=> string(4) "v3.1"

When i try to fetch with getGraphVersion() in FacebookResponse.php it returns null. Problem i found was that key is in CamelCase.

public function getGraphVersion()
{
    return isset($this->headers['Facebook-API-Version']) ? $this->headers['Facebook-API-Version'] : null;
}