User News Feed

A user's news feed centralizes his publications. You can also put a message that will be intended for him in the same way as you would on your news feed.

📘

Learn more on News Feed

Refer to the News Feed / Activity Stream documentation for more information

// Get user
User user = session.getUser().blockingGet(USER_ID);

// List News Feed from User
Iterable<Feed> newsFeedIterable = user.blockingListNewsFeed(PAGE, SIZE);

// Post on the User News Feed
FeedPost feedPost = new FeedPost.Builder()...build();
Feed postedFeed = user.blockingCreateFeedPost(feedPost);
// Get user
let user = try session.user.blockingGet(USER_ID)

// List News Feed from User
let newsFeedIterable = try user?.blockingListNewsFeed(page: PAGE, size: SIZE)

// Post on the User News Feed
let feedPost = FeedPost.Builder()...build()
let postedFeed = user.blockingCreateFeedPost(feedPost)
let user = await session.user.get(USER_ID);
let feeds = await user.listNewsFeed(PAGE, SIZE);

let post = (new FeedPost())
    .setMessage("This is a simple text message")
    .setVisibility(AccessControl.Public);
let feed = await user.createFeedPost(post);
session.user.get(USER_ID).then((user)=> {
  user.listNewsFeed(PAGE, SIZE).then((newsFeed)=> {

  });

  let post = (new FeedPost())
    .setMessage("This is a simple text message")
    .setVisibility(AccessControl.Public);
  user.createFeedPost(post).then((feed)=> {
  
  });
});