hi,i want to use some Adwords api. and i have got developer_token and application_token, i use the demo of get_keyword_variations.php .
But it returns "List of additional keywords to consider has 0 variation (s). List of popular queries with given seed has 0 variation(s).", it shows maybe the method of getKeywordVariations not work rightly. i don't want to use APIlity,just to debug this.tks. The code of get_keyword_variations.php is below and i have replace the email and others using myown information and i can provide the right information about the email and password if necessary. # Provide AdWords login information. $email = 'INSERT_LOGIN_EMAIL_HERE'; $password = 'INSERT_PASSWORD_HERE'; $client_email = 'INSERT_CLIENT_LOGIN_EMAIL_HERE'; $useragent = 'INSERT_COMPANY_NAME: AdWords API PHP Sample Code'; $developer_token = 'INSERT_DEVELOPER_TOKEN_HERE'; $application_token = 'INSERT_APPLICATION_TOKEN_HERE'; # Define SOAP headers. $headers = '<email>' . $email . '</email>'. '<password>' . $password . '</password>' . '<clientEmail>' . $client_email . '</clientEmail>' . '<useragent>' . $useragent . '</useragent>' . '<developerToken>' . $developer_token . '</developerToken>' . '<applicationToken>' . $application_token . '</applicationToken>'; # Set up service connection. To view XML request/response, change value of # $debug to 1. To send requests to production environment, replace # "sandbox.google.com" with "adwords.google.com". $namespace = 'https://adwords.google.cn/api/adwords/v12'; $keyword_tool_service = SoapClientFactory::GetClient( $namespace . '/KeywordToolService?wsdl', 'wsdl'); $keyword_tool_service->setHeaders($headers); $debug = 1; # Create seed keyword structure. $seed_keyword = '<negative>false</negative>' . '<text>tea</text>' . '<type>Broad</type>'; $use_synonyms = '<useSynonyms>true</useSynonyms>'; # Get keyword variations. $request_xml = '<getKeywordVariations>' . '<seedKeywords>' . $seed_keyword . '</seedKeywords>' . $use_synonyms . '<languages>en</languages>' . '<countries>US</countries>' . '</getKeywordVariations>'; $variation_lists = $keyword_tool_service->call('getKeywordVariations', $request_xml); $variation_lists = $variation_lists['getKeywordVariationsReturn']; if ($debug) show_xml($keyword_tool_service); if ($keyword_tool_service->fault) show_fault($keyword_tool_service); # Display keyword variations. $to_consider = $variation_lists['additionalToConsider']; echo 'List of additional keywords to consider has ' . count ($to_consider) . ' variation(s).' . "\n"; $more_specific = $variation_lists['moreSpecific']; echo 'List of popular queries with given seed has ' . count ($more_specific) . ' variation(s).' . "\n"; ?> tks helping me. Waiting for your response. Seam --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---