Hi,

You could refer to the below sample code :

   CriterionUserInterest userInterest = new CriterionUserInterest();
    userInterest.setUserInterestId(80429L);  // this will be the id field 
found in the  Affinity 
<https://developers.google.com/adwords/api/docs/appendix/affinity-categories> 
or In-Market 
<https://developers.google.com/adwords/api/docs/appendix/in-market-categories> 
categories
    
    BiddableAdGroupCriterion userInterestBiddableAdGroupCriterion1 = new 
BiddableAdGroupCriterion();
    userInterestBiddableAdGroupCriterion1.setAdGroupId(adGroupId);
    userInterestBiddableAdGroupCriterion1.setCriterion(userInterest);
    
    AdGroupCriterionOperation adGroupCriterionOperation1 = new 
AdGroupCriterionOperation();
    adGroupCriterionOperation1.setOperand(
userInterestBiddableAdGroupCriterion1);
    adGroupCriterionOperation1.setOperator(Operator.ADD);
    
    AdGroupCriterionOperation[] operations =
            new AdGroupCriterionOperation[] {adGroupCriterionOperation1
                };
     
    AdGroupCriterionReturnValue result = adGroupCriterionService.mutate(
operations);


Regards,
Peter
AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/5b0de2ac-efa4-4e73-a420-e0b4cf9e8476%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to