Welcome Guest, Not a member yet? Register   Sign In
Facebook composer library for login - class not found
#1

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.
Reply
#2

Your namespace is looking relative to the current namespace (App\Controllers). Try
new \Facebook\Facebook();
Reply
#3

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.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB