function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Monish Mahalingam 13Monish Mahalingam 13 

chatter recommendations

How to display chatter recommendations in custom Visual Force page. I searched for the connect API methods but I can't find the exact one. So please update with the connect API methods.

User-added image
KaranrajKaranraj
Monish - You can able to get recommendations for particular user using getRecommendationforUser() method.

The following are methods for Recommendations. All methods are static.
  • getRecommendationForUser(communityId, userId, action, objectId) - Returns the recommendation for the context user for the specified action and object ID.
  • getRecommendationsForUser(communityId, userId, contextAction, contextObjectId, maxResults) - Returns the user, group, file, record, and custom recommendations for the context user.
  • getRecommendationsForUser(communityId, userId, action, contextAction, contextObjectId, maxResults) - Returns the recommendations for the context user for the specified action.
  • getRecommendationsForUser(communityId, userId, action, objectCategory, contextAction, contextObjectId, maxResults) - Returns the recommendations for the context user for the specified action and object category.  
For more details about recommendation method check this link - https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_ConnectAPI_Recommendations_static_methods.htm#apex_ConnectAPI_Recommendations_getRecommendationForUser_2

Thanks,
Karanraj (http://www.karanrajs.com)