j7mbo/twitter-api-php via composer and CI4 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: j7mbo/twitter-api-php via composer and CI4 (/showthread.php?tid=77312) |
j7mbo/twitter-api-php via composer and CI4 - jolupa - 08-14-2020 Hi. I installed, via composer, the j7mbo twitter api, and followed all the code I found online but with no luck. I always have the same error: "Class 'App\Controllers\TwitterAPIExchange' not found" No matter if I put on Autoload in classmap the following: PHP Code: $classmap = [ and call it on my Controller with the following code: PHP Code: $twitem = new CommunicationsModel(); Anyone can put me in the right direction? Thanks a lot! RE: j7mbo/twitter-api-php via composer and CI4 - jreklund - 08-14-2020 Put a forward slash in front of it. From: Code: $tweet = new TwitterAPIExchange($twsettings); Into: Code: $tweet = new \TwitterAPIExchange($twsettings); You don't need to put in the classmap, composer will find it for you. RE: j7mbo/twitter-api-php via composer and CI4 - jolupa - 08-15-2020 (08-14-2020, 02:51 PM)jreklund Wrote: Put a forward slash in front of it. Thank you it works now! Thank you very much! RE: j7mbo/twitter-api-php via composer and CI4 - jreklund - 08-15-2020 (08-15-2020, 10:11 AM)jolupa Wrote: Thank you it works now! Thank you very much! You're welcome. Happy coding! |