• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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