I am using .net client object model for MicroBlogging (Post with hashtags). I am getting access denied error.
i am using below code
const string serverUrl = "http://usfkl13as133v:9191/en-US/";
const string tagName = "#" + "moss2007";
// Define the link to a tag that you want to include in the post. If the tag is new, the
// server adds it to the tags collection.
SocialDataItem tagLink = new SocialDataItem
{
ItemType = SocialDataItemType.Tag,
Text = tagName
};
// Add the tag to the post's creation data.
// Put a placeholder ({0}) where you want the tag to appear in the post text,
// and then add the tag to the post's content items.
SocialPostCreationData postCreationData = new SocialPostCreationData();
postCreationData.ContentText = "I like {0}.";
postCreationData.ContentItems = new SocialDataItem[1] { tagLink };
try
{
// Get the context and the SocialFeedManager instance.
ClientContext clientContext = new ClientContext(serverUrl);
SocialFeedManager feedManager = new SocialFeedManager(clientContext);
// Publish the post. This is a root post to the user's feed, so specify
// null for the targetId parameter.
feedManager.CreatePost(null, postCreationData);
clientContext.ExecuteQuery();
}
catch (Exception ex)
{
}