C#.NET : Implement LocationSearchParameter in Targetingideas

11 views
Skip to first unread message

Oladotun Ogunsulire

unread,
Feb 26, 2018, 4:40:00 AM2/26/18
to AdWords API Forum
Hi

I am trying to implement the LocationSearchParameter in C#.NET, I found some php code
and roughly converted it to get

`Location unitedkingdom = new Location();
unitedkingdom.id = 2826; // UK
Location[] loc = { unitedkingdom } ;
LocationSearchParameter mylocationParam = new LocationSearchParameter();
mylocationParam.locations = loc ;
searchParameters.Add(mylocationParam);`

I cant say if its working , and it doees not look correct to me.

There is not code sample for this in the documentation.

Cheers

Ola

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Feb 26, 2018, 10:36:47 AM2/26/18
to AdWords API Forum
Hi Ola, 

Are you trying to get Keyword Ideas and setting your desired location as a search parameter? If so, you could refer to the complete code samples here. The linked guide should also be helpful while working with the TargetingIdeaService. Please give that a try and let me know if you face any issues. If your question was different, could you elaborate? 

Thanks,
Sreelakshmi, AdWords API Team
Reply all
Reply to author
Forward
0 new messages