问题
I can't get Microsoft pubCenter ads to work in my Windows Phone 8 App. When I run my app I only see white space instead of the ad Changing to test values doesn't seem to show an ad neither Can you help me? Thanks in advance
That's what I see in my pubCenter account
That's my XAML and my app's references
回答1:
Try this It Should Work fine
Xaml:
xmlns:UI="clr-namespace:Microsoft.Advertising.Mobile.UI;assembly=Microsoft.Advertising.Mobile.UI"
<UI:AdControl ApplicationId="test_client" AdUnitId="Image480_80" Height="80" Width="480" VerticalAlignment="Bottom" ErrorOccurred="AdControl_ErrorOccurred"/>
The following ID_CAP capabilities must be included in the manifest of the advertising-enabled app. ID_CAP_IDENTITY_USER
ID_CAP_MEDIALIB_PHOTO
ID_CAP_NETWORKING
ID_CAP_PHONEDIALER
ID_CAP_WEBBROWSERCOMPONENT
回答2:
It takes PubCenter a couple of days to populate ads for a new App. To see how the ads look, use the default ad in debug mode. Once PubCenter has seeded Bing's ad delivery system, you'll start seeing ads in App.
#if DEBUG
return new AdControl()
{
AdUnitId = "Image480_80",
ApplicationId = "test_client",
Height = 80,
IsAutoCollapseEnabled = autocollapse,
IsAutoRefreshEnabled = true,
Width = 480,
};
#endif
来源:https://stackoverflow.com/questions/24111672/microsoft-pubcenter-ads-not-showing-in-my-wp8-app