2

According to the Facebook documentation, you can update the run status of an individual ad group via the ads api.

To do this, you submit a POST request to /<AD_GROUP_ID>/ with adgroup_status=X where X is your status (1 for active, 9 for paused, etc). However, making this request results in the status NOT changing, and the only response you get back from Facebook is a JSON representation of the Ad Group.

Has anyone been able to successfully submit ad group status updates to the facebook ads api? If so, are you using the method outlined above, or is there another trick to it?

thanks!

EDIT

I cross posted this into the Facebook Bug tracker in hopes to create a trail/awareness/find more people who were having this problem. https://developers.facebook.com/bugs/354657724569051

EDIT
An example of the request I'm making. This request is being tested from the Facebook Graph Explorer

https://graph.facebook.com/6003521999629?adgroup_status=9&method=POST&access_token=<access_token>
Jim Rubenstein
  • 6,836
  • 4
  • 36
  • 54
  • Charles, can you post an example of the CURL call you're using? Indeed the parameter should be adgroup_status like you mention, and it seems like the values you're giving are indeed correct. Are you sure you're making an HTTP POST? The behavior you're describing sounds like a GET. – Justin Voskuhl Feb 28 '12 at 19:28
  • I'm Jim, but I can post that, sure. I was actually testing using the FB Graph explorer, and according to the FB documentation you can override the HTTP method using the `method` parameter, which is what I was doing. I'll post it up in just a minute. – Jim Rubenstein Feb 28 '12 at 20:01
  • @JustinVoskuhl I posted the information you requested. – Jim Rubenstein Feb 28 '12 at 20:05
  • turns out, i'm stupid. you have to switch the request type in the graph explorer tool interface, you can't just force it with the `method` parameter. – Jim Rubenstein Feb 28 '12 at 23:28

2 Answers2

0

If you're making that API call and receiving the adgroup's details back instead of a 'true' response, it means you're making a GET request, not a POST request.

Update your code to make a HTTP POST request, and this will resolve your issue, John Pickard's answer above is an example of making a POST request in curl, but it will change depending on your application's language and/or which Facebook SDK you're using.

Igy
  • 43,710
  • 8
  • 89
  • 115
0

We have not been experiencing problems with changing adgroup_status. Try submitting the status number as an integer and then as a string (I don't remember which type they expect). Note that if the campaign is paused, setting the adgroup_status to 1 will actually change it to 8 (campaign_paused). The fact that you're getting the adgroup to redownload (I presume you have the redownload=1 parameter) tells me that your call is mostly correct. I just confirmed that this works:

curl -F "adgroup_status=9" \
-F "ids=..." \
-F "access_token=..." \
https://graph.facebook.com/
John Pickard
  • 308
  • 1
  • 8
  • I don't have `redownload=1`, a string vs an int shouldn't matter, as this is a `POST` request, they're all strings. \: – Jim Rubenstein Feb 28 '12 at 14:54
  • turns out, i'm stupid. you have to switch the request type in the graph explorer tool interface, you can't just force it with the `method` parameter. – Jim Rubenstein Feb 28 '12 at 23:28