Sending Social Messages via the API

Return to previous page

  • 4/7/2015
  • 1275 Views

Comments

1275 Views

Sending Social Messages via the API

Last updated 4 years ago

Comments

Common

(Enter the content of this article below)

Advanced

 
===Background=

DNN introduced the messaging and notification centre in 6.2.0 , where users can send and receive messages and notifications. Whilst this is similar in concept to email, it his it's own API to support sending to lists of users or/and roles (including social groups).

To send a simple messages to the current user you can use code such as :

DotNetNuke.Services.Social.Messaging.Message message = new Message();

List<UserInfo> users = new List<DotNetNuke.Entities.Users.UserInfo>();
users.Add(UserController.GetUserById(INTEGER, INTEGER));
message.Body = STRING;
message.Subject = STRING;
MessagingController.Instance.SendMessage(message, null, users, null, this.UserInfo);

Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  


Copyright 2018 by DNN Corp Terms of Use Privacy
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out