is there any way by which i can add a specific user or group as target audience of my custom web part programatically ??
i am using
SPWeb web = SPContext.Current.Web;
SPLimitedWebPartManager wpm= web.GetLimitedWebPartManager("SitePages/UserHomePage.aspx?", PersonalizationScope.Shared);
web.AllowUnsafeUpdates = true;
AudienceManager am = new AudienceManager(ServerContext.Current);
wpm.WebParts[1].AuthorizationFilter
= string.Format("{0};;;;", am.Audiences[1].AudienceID);
wpm.SaveChanges(wpm.WebParts[1]);
web.AllowUnsafeUpdates = false ;
for setting complied audience to my web part. but my requirement is to add 2-3 specific users or their group as target audience ** here we can not compile audience for these user.. **