SammyK / LaravelFacebookSdk

Fully unit tested Facebook SDK v5 integration for Laravel & Lumen
MIT License
693 stars 201 forks source link

FB Login -> Error: Undefined offset: 1 #220

Open amsmithmt opened 4 years ago

amsmithmt commented 4 years ago

Hi,

A new installation of the SDK, I'm getting Error: Undefined offset: 1 on facebook login during the callback.

Script file referenced is vendor\facebook\graph-sdk\src\Facebook\Http\GraphRawResponse.php

Line 108

Below code in the graph sciprt file:

public function setHttpResponseCodeFromHeader($rawResponseHeader)
    {
        preg_match('|HTTP/\d\.\d\s+(\d+)\s+.*|', $rawResponseHeader, $match);
        $this->httpResponseCode = (int)$match[1];
    }

Does anyone have a suggestion for fixing this?

The callback itself comes as https://mywebsite/facebook/callback?code=

Thanks