问题描述
您好,
我正在尝试使用PHP从沙箱帐户获取所有广告系列信息。但每次我都失败了。我无法理解我做错了什么。我需要帮助。
I am trying to get all campaigns information from a sandbox account using PHP. But every time I am failing. I can not understand what I am doing wrong. I am in need of help.
在此处附加我的代码示例 -
Attaching my code sample here--
$wsdl = "https://api.sandbox.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v9/CampaignManagementService.svc?singleWsdl";
$proxy = ClientProxy::ConstructWithAccountAndCustomerId($wsdl, $UserName, $Password, $DeveloperToken, $accountId, $CustomerId, null);
$aInfos = GetCampaignsInfo($proxy, $accountId);
die($aInfos);
function GetCampaignsInfo($proxy, $accountId)
{
// Set the request information.
$request = new GetCampaignsByAccountIdRequest();
$request->AccountId = $accountId;
//$request->CampaignType = CampaignType::SearchAndContent;
return $proxy->GetService()->GetCampaignsInfo($request)->Campaigns;
}
我一直收到以下回复 -
"Last SOAP请求/回复:https://api.sandbox.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v9/CampaignManagementService.svc?singleWsdl"
I am getting the following response all the time--
"Last SOAP request/response: https://api.sandbox.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v9/CampaignManagementService.svc?singleWsdl"
非常感谢任何帮助。提前致谢。
Any help is highly appreciated. Thanks in advance.
推荐答案
你命名你的函数GetCampaignsInfo ,这没关系。但是,在调用Campaign Management服务时,您必须使用提供的接口之一,例如GetCampaignsByAccountId如下:
You named your function GetCampaignsInfo, which is OK. However, when calling the Campaign Management service you must use one of the provided interfaces e.g. GetCampaignsByAccountId as follows:
return
我希望这有帮助!
这篇关于广告系列效果信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!