Open tafelnl opened 5 years ago
Did you add a use Facebook\Exceptions\FacebookSDKException
statement?
If not, that's probably why it isn't catching the Exception.
Yes I did, that is the weird part.
Hmm, now that I am thinking about it. I have added this statement in a config
file.
I include this config
file in the callback
file.
So I should maybe redeclare the use
statement in the callback
file?
If so, is there another way in PHP to avoid copy- and pasting the same use statements throughout every file needed? Because that is what I was trying to achieve by adding the use
statement in a config
file
I have the following code (simplified) for a login flow through Facebook.
When I try to login for the first time (the second time the flow goes perfectly) I get the following error message:
It's weird, because I actually am catching the error.
Besides, it's weird that the error is thrown anyway, because I don't think I implemented anything wrong. And when I try to login a second time, it does not give any errors.
Only when I completely start a new session the error is thrown. (when going incognito for example)
But it's getting even weirder: When I go incognito, and first go to https://facebook.com and login, and afterwards go to my site and login through Facebook, it also does not give any errors.
So really only when you start a completely fresh session and login for the first time.