Facebook composer library for login - class not found |
Hello!
In CI3 sites that I have, to create a facebook login with PHP SDK, I use the instructions from this page ( https://shareurcodes.com/blog/facebook%2...odeigniter ) . The problem is that in CI4 I get the following error: "Class 'App\Controllers\Facebook\Facebook' not found" The error is on this line: "$fb = new Facebook\Facebook" Please help.
Your namespace is looking relative to the current namespace (App\Controllers). Try
new \Facebook\Facebook();
Thanks a lot! It worked with use Facebook\Facebook;. After that i just had to call new Facebook. Previously I called $fb = new Facebook\Facebook which was wrong.
|
Welcome Guest, Not a member yet? Register Sign In |