1 Replies - 212 Views - Last Post: 07 November 2017 - 04:28 PM Rate Topic: -----

#1 mooninite  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 07-November 17

Has anyone gotten the Facebook Marketing API to work successfully?

Posted 07 November 2017 - 03:57 PM

This thread is aimed towards helping people create successful iterations of the Facebook Marketing API.

Facebook has their own help group, but they are not accepting anyone at the time being, so this API is strongly lacking community support.

I will post implementations of my code ( in PHP ), however I have not been able to successfully create an Ad in the Facebook Ads Manager from the API implementation. Has anyone been able to?

The Facebook API has many stages
-Create instance of the $API,
- Get Ad Accounts
-Create Campaign
-Specify Targeting
-Create Ad Group
-Create Ads and Ad Creatives

Here is the Facebook API Reference
https://developers.f...i/using-the-api
As well as the GitHub API Reference
https://github.com/f...ook-php-ads-sdk


First Steps:

Create instance of $API

use FacebookAds\Api;

// Initialize a new Session and instanciate an Api object
Api::init($app_id, $app_secret, $access_token);

// The Api object is now available trough singleton
$api = Api::instance();





Get Accounts

??

Create Campaign

use FacebookAds\Object\Campaign;
use FacebookAds\Object\Fields\CampaignFields;
use FacebookAds\Object\Values\CampaignObjectiveValues;

$campaign = new Campaign(null, 'act_<AD_ACCOUNT_ID>');
$campaign->setData(array(
  CampaignFields::NAME => 'My campaign',
  CampaignFields::OBJECTIVE => CampaignObjectiveValues::LINK_CLICKS,
));

$campaign->create(array(
  Campaign::STATUS_PARAM_NAME => Campaign::STATUS_PAUSED,
));





At this point a person should be able to see their Campaign in the Ads Manager. Has anyone been able to successfully do this?

Is This A Good Question/Topic? 0
  • +

Replies To: Has anyone gotten the Facebook Marketing API to work successfully?

#2 ArtificialSoldier  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1828
  • View blog
  • Posts: 5,755
  • Joined: 15-January 14

Re: Has anyone gotten the Facebook Marketing API to work successfully?

Posted 07 November 2017 - 04:28 PM

I think there's people in Russia who know how to do this, but unfortunately I don't speak Russian.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1