I am currently developing an application using the AdWords API.
I followed this guide
<http://www.sagerock.com/blog/setting-google-adwords-api-access-first-time/>
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
<https://developers.google.com/adwords/api/docs/guides/managing-accounts>).
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?
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/7ea12bdf-b550-45d7-a050-e451c5db4f2e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.