Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class facebook-ads does not exist #41

Open
kalimulhaq opened this issue Jan 2, 2019 · 2 comments
Open

Class facebook-ads does not exist #41

kalimulhaq opened this issue Jan 2, 2019 · 2 comments

Comments

@kalimulhaq
Copy link

kalimulhaq commented Jan 2, 2019

I am using the package with Lumen but getting this error

(1/1) ReflectionException
Class facebook-ads does not exist

Can you please help me what I'm messing?

My Controller

use Edbizarro\LaravelFacebookAds\Facades\FacebookAds;

class LeadController extends Controller {

 public function facebookTest(Request $request) {
        FacebookAds::init('MY SESSION TOKEN');
        $ads = FacebookAds::adAccounts()->all()->map(function ($adAccount) {
            return $adAccount->ads(['name', 'account_id', 'account_status', 'balance', 'campaign', 'campaign_id', 'status']);
        });

        $this->success($ads);
    }
}

config/app.php

'aliases' => [
        ....
        'FacebookAds' => Edbizarro\LaravelFacebookAds\Facades\FacebookAds::class
    ]

I'm using Lumen 5.7

@edbizarro
Copy link
Owner

hi @kalimulhaq

I never set up a lumen instance myself, so, I don't know exactly why does this happen, I'll try to set up a lumen install to see what's going on

@n1vekk
Copy link

n1vekk commented Mar 30, 2020

Did you add the provider in app.php?

Edbizarro\LaravelFacebookAds\Providers\LaravelFacebookServiceProvider::class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants