Imanuel
Imanuel

Reputation: 3

Can't upload Facebook AdImage

Im trying to upload an image using the Marketing API

$image = new AdImage(null, 'act_<AD_ACCOUNT_ID>');
$image->{AdImageFields::FILENAME} = 'http://www.newspringcapital.com/uploads/portfolio/homepage/Innovid%20Home.png';

$image->create();
echo 'Image Hash: '.$image->{AdImageFields::HASH}.PHP_EOL;

but I'm getting the following error:

"couldn't open file "http://www.newspringcapital.com/uploads/portfolio/homepage/Innovid%20Home.png"

Upvotes: 0

Views: 313

Answers (1)

user10089632
user10089632

Reputation: 5550

AdImageFields::FILENAME uses a path not a URL

Consider uploading it to your local folder than using it

Upvotes: 3

Related Questions