Additionaly, when I add email before, during update I should add only new 
email or old and new ? I need have old and new email in remarketing list.



W dniu piątek, 26 sierpnia 2016 15:24:52 UTC+2 użytkownik 
testapi...@gmail.com napisał:
>
> Hello :)
>
> It's my code:
>     public function AdAudience($name,$desc='',$emaillist='',$idgr  =''){
>         $audience_id = '';
>
>     try {
>      require_once dirname(dirname(__FILE__)) . '/Google/init.php';
>
>      $user = new AdWordsUser();
>
>      $user->LogAll();
>       $EMAILS = array();
>       foreach ($emaillist as $key => $value) {
>         $EMAILS[]=$value;
>       }
>
>
>      $userListService = $user->GetService('AdwordsUserListService',
>       ADWORDS_VERSION);
>
>
>      $userList = new CrmBasedUserList();
> $userList->id = $idgr;
>
>      $operation = new UserListOperation();
>      $operation->operand = $userList;
>      $operation->operator = 'SET';
>
>      $operations = array($operation);
>      
>      $result = $userListService->mutate($operations);
>      $userListAdded = $result->value[0];
>      
>      $audience_id =  $idgr;
>      $userListId = $idgr;
>      
>      
>      $mutateMembersOperation = new MutateMembersOperation();
>      $operand = new MutateMembersOperand();
>      $operand->userListId = $userListId;
>
>   // You can optionally provide this field.
>      $operand->dataType = 'EMAIL_SHA256';
>
>      $emailHashes = array();
>      foreach ($EMAILS as $email) {
>       $emailHashes[] = hash('sha256', strtolower(trim($email)));
>     }
>     $operand->members = $emailHashes;
>     $mutateMembersOperation->operand = $operand;
>     $mutateMembersOperation->operator = 'SET';
>
>     $mutateMembersOperations = array($mutateMembersOperation);
>
>     $mutateMembersResult =
>     $userListService->mutateMembers($mutateMembersOperations);
>
>
>
>
>
>
>   } catch (Exception $e) {
>     printf("An error has occurred: %s\n", $e->getMessage());
>   }
>
>
>   return array(
>     "id"=>$audience_id,
>     "name"=>$name
>     );
>
> }
>
>
>
> Audience has already been created, now they need to add recipients, or e-mail 
> addresses. I wrote this function but unfortunately gets error:
>
> [OperatorError.OPERATOR_NOT_SUPPORTED @ operations[0]]
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/d7c2242f-4225-490d-969c-83d90bc37bbc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Update remarketi... testapidilren2
    • Re: Update ... testapidilren2
      • Re: Upd... 'Vishal Vinayak (Adwords API Team)' via AdWords API Forum
        • Re:... testapidilren2
          • ... 'Vishal Vinayak (Adwords API Team)' via AdWords API Forum

Reply via email to