edbizarro/laravel-facebook-ads

Connection timed out after 10000 milliseconds

seometis opened this issue · 2 comments

Hello! I've installed new Laravel 5.7 on PHP 7.2 and setted up your library according readme.
I tried to run the code below and i've got exception:
FacebookAds \ Exception \ Exception (28)
Connection timed out after 10000 milliseconds

FacebookAds::init('...');
    $ads = FacebookAds::adAccounts()->all()->map(function ($adAccount) {
        return $adAccount->ads(
            [
                'name',
                'account_id',
                'account_status',
                'balance',
                'campaign',
                'campaign_id',
                'status'
            ]
        );
    });

    dd($ads);

Can you help me fix it?

Hi @seometis

Looks like you have too many ads to fetch all at once or something about your internet connection

Thanks a lot! That's really bad internet connection. When i use DigitalOcean - everything is fine.