You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to set up an event request per the documentation and examples, but I'm getting an error when I try to use setActionSource(). Am I missing something or is this an actual bug?
use FacebookAds\Api;
use FacebookAds\Logger\CurlLogger;
use FacebookAds\Object\ServerSide\Content;
use FacebookAds\Object\ServerSide\CustomData;
use FacebookAds\Object\ServerSide\DeliveryCategory;
use FacebookAds\Object\ServerSide\Event;
use FacebookAds\Object\ServerSide\EventRequest;
use FacebookAds\Object\ServerSide\Gender;
use FacebookAds\Object\ServerSide\UserData;
use FacebookAds\Object\ServerSide\Util;
....
$event_0 = (new Event())
->setEventName($eventName)
->setEventTime(strtotime("now"))
->setActionSource("Website") // throws errors for some reason
->setUserData($user_data_0)
->setCustomData($custom_data_0);
array_push($events, $event_0);
$request = (new EventRequest($pixel_id))
->setEvents($events);
Error Message in PHP logs: Error: Call to undefined method FacebookAds\Object\ServerSide\Event::setActionSource()
The text was updated successfully, but these errors were encountered:
Update, I added the following to the top of my file as well:
use FacebookAds\Object\ServerSide\ActionSource;
But still no luck. I also get errors if I try using the "setEmails" or "setPhones" methods too - but I found that "setEmail" and "setPhone" work ok, which is fine since I won't have more than 1 value for each of those anyway.
I'm trying to set up an event request per the documentation and examples, but I'm getting an error when I try to use setActionSource(). Am I missing something or is this an actual bug?
Error Message in PHP logs: Error: Call to undefined method FacebookAds\Object\ServerSide\Event::setActionSource()
The text was updated successfully, but these errors were encountered: