@@ -30,18 +30,20 @@ Examples:
3030}
3131
3232var (
33- debugMetaPath string
34- debugMetaMethod string
35- debugMetaParams string
36- debugMetaPageID string
33+ debugMetaPath string
34+ debugMetaMethod string
35+ debugMetaParams string
36+ debugMetaPageID string
37+ debugMetaAdAccountID string
3738)
3839
3940func init () {
4041 // Meta Ads debug
4142 debugMetaAdsCmd .Flags ().StringVar (& debugMetaPath , "path" , "" , "Graph API path, e.g. me/adaccounts or act_123/campaigns (required)" )
42- debugMetaAdsCmd .Flags ().StringVar (& debugMetaMethod , "method" , "GET" , "HTTP method: GET or POST " )
43+ debugMetaAdsCmd .Flags ().StringVar (& debugMetaMethod , "method" , "GET" , "HTTP method: GET, POST, or DELETE " )
4344 debugMetaAdsCmd .Flags ().StringVar (& debugMetaParams , "params" , "" , "JSON object of additional query/body params" )
4445 debugMetaAdsCmd .Flags ().StringVar (& debugMetaPageID , "page-id" , "" , "Use this page's access token instead of user token" )
46+ debugMetaAdsCmd .Flags ().StringVar (& debugMetaAdAccountID , "ad-account-id" , "" , "Explicit ad account ID for token resolution (e.g. act_123456)" )
4547 debugMetaAdsCmd .MarkFlagRequired ("path" )
4648 debugCmd .AddCommand (debugMetaAdsCmd )
4749
@@ -126,6 +128,9 @@ func runDebugMetaAds(cmd *cobra.Command, args []string) error {
126128 if debugMetaPageID != "" {
127129 body ["page_id" ] = debugMetaPageID
128130 }
131+ if debugMetaAdAccountID != "" {
132+ body ["ad_account_id" ] = debugMetaAdAccountID
133+ }
129134
130135 c := client .NewREST (getWebAPIURL (), token )
131136 result , err := c .Post ("/api/debug/meta-ads" , body )
0 commit comments