title: Facebook adgroup creation - Invalid parameter
body: <p>I am having an issue promoting an unpublished page post via the ads-api.
  This was previously working ok for me, but began causing problems yesterday.</p>
  
  <p>I first create an ad_campaign, and then, using the returned campaign_id, I attempt to create an adgroup.</p>
  
  <p>The response from the server is </p>
  
  <pre><code>array(1) {
    'error' =&gt;
     array(3) {
       'message' =&gt;
         string(53) "(#100) Invalid parameter: adgroup_spec["campaign_id"]"
       'type' =&gt;
         string(14) "OAuthException" 
       'code' =&gt; int(100)
     }
  }
  </code></pre>
  
  <p>I have verified that I am sending over the correct, newly created campaign_id.</p>
  
  <p>Another point of interest; when I use the UI to delete the ad_campaign afterwards, I am told that I do not have permission to do so. User XXXX does not have permission to access campaign YYYY.</p>
  
  <p>I'm thinking this must be an access_token/permission issue but I'm stumped. The ad objects are created using the user's token, and the unpublished page post is created using the page's access token.</p>
  
  <p>NB: I can provide snippets if needs be, but I'm fairly sure this is a problem with the object creation flow as opposed to a code issue.</p>
  
  <p>Has anyone seen anything similar?</p>
  
  <p>Cheers, Gary</p>
  
  <p><strong>Update with POST data</strong></p>
  
  <pre><code>array(7) {
    'campaign_id' =&gt;
      int(6013621027457)
    'bid_type' =&gt;
      int(6)
    'bid_info' =&gt;
      string(37) "{"clicks":10,"reach":10,"actions":80}"
    'conversion_specs' =&gt;
      string(66) "{"action.type":"offsite_conversion","offsite_pixel":6013619180457}"
    'creative' =&gt;
      string(86) "{"type":27,"object_id":407012979370770,"auto_update":false,"story_id":565852233486843}"
    'name' =&gt;
      string(23) "PropelAd (via PropelAd)"
    'targeting' =&gt;
      string(95) "{"countries":["IE","AE","GB"],"friends_of_connections":[407012979370770],"page_types":["feed"]}"
  </code></pre>
  
  <p>}</p>