• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Facebook composer library for login - class not found


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.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.