when ı updated site links  give me error like this

Request Id : a96meqnkqlLnHykRjHVvbw mutate_error Error Code  Resource was 
not found.
 how can ı update sitelink asset and remove site links

my code :

          // Creates an extension feed item using the specified feed item 
ID and sitelink text.
        $extensionFeedItem = new ExtensionFeedItem([
            'resource_name' => 
ResourceNames::forExtensionFeedItem($customerId, $feedItemId),
            'sitelink_feed_item' => new SitelinkFeedItem(['link_text' => 
$sitelinkText])
        ]);

        // Constructs an operation that will update the extension feed 
item, using the FieldMasks
        // utility to derive the update mask. This mask tells the Google 
Ads API which attributes of
        // the extension feed item you want to change.
        $extensionFeedItemOperation = new ExtensionFeedItemOperation();
        $extensionFeedItemOperation->setUpdate($extensionFeedItem);
        
$extensionFeedItemOperation->setUpdateMask(FieldMasks::allSetFieldsOf($extensionFeedItem));

        // Issues a mutate request to update the extension feed item.
        $extensionFeedItemServiceClient = 
$googleAdsClient->getExtensionFeedItemServiceClient();
        $response = 
$extensionFeedItemServiceClient->mutateExtensionFeedItems(
            $customerId,
            [$extensionFeedItemOperation]
        );

        // Prints the resource name of the updated extension feed item.
        /** @var ExtensionFeedItem $updatedExtensionFeedItem */
        $updatedExtensionFeedItem = $response->getResults()[0];
        printf(
            "Updated extension feed item with resource name: '%s'.%s",
            $updatedExtensionFeedItem->getResourceName(),
            PHP_EOL
        );

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/20258169-2b1c-4a8c-9bbc-00ea5178c551n%40googlegroups.com.

Reply via email to