I am currently developing an application using the AdWords API.
I followed
this guide to use it in conjunction with XAMPP and PHP AdWords Library. I followed everything and edited the auth.ini file to have my credentials as such, got the RefreshToken and everything. So I do not believe it is an authorization issue. Now, to my knowledge, in order to get the campaigns from the client accounts, you must link them (
stated here). So I am trying to do this, here's what my file looks like:
<?php
include "C:\xampp\htdocs\adwords\src\Google\Api\Ads\AdWords\v201506\ManagedCustomerService.php";
LinkOperation linkOp = new LinkOperation();
ManagedCustomerLink link = new ManagedCustomerLink();
link.setClientCustomerId("xxx");
link.setLinkStatus(LinkStatus.PENDING);
link.setManagerCustomerId("xxx");
linkOp.setOperand(link);
linkOp.setOperator(Operator.ADD);
managedCustomerService.mutateLink(new LinkOperation[]{linkOp});
?>
replacing "xxx" with the proper IDs from the client account and my customer ID.
and upon running it from the command line, I am receiving this error:
Parse error: syntax error, unexpected 'linkOp' (T_STRING) in C:\xampp\htdocs\a
ords\examples\AdWords\v201506\AccountManagement\LinkClientToMCC.php on line 6
Am I going about this wrong?