Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

i want make social webpart use the SSOM

$
0
0

HI, my englihs is bad.

i want make webpart, write Text("Hello") -> Click Button -> teamsitehttp://abcd:1111/  main newsfeed ->

"Hello"

firest

so i tried make webpart use CSOM, but i think webpart project is can not use CSOM(ClientContext),this is true?

second

so i retried use SSOM

using (SPSite site = new SPSite("http://nar-cla500s3:2222/"))
            {
                SPServiceContext context = SPServiceContext.GetContext(site);
                using (new SPServiceContextScope(context))
                {
                    SPSocialFeedManager sfm = new SPSocialFeedManager();
                    SPSocialFeedOptions options = new SPSocialFeedOptions();
                    options.SortOrder = SPSocialFeedSortOrder.ByCreatedTime;
                    options.MaxThreadCount = 10;
                    var aaa = sfm.GetFeed(SPSocialFeedType.Personal, options);
                    Label1.Text = aaa.ToString();
                }    
            }          

http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/d38278e1-7b80-4f8c-9b42-0857cf52f65f

i copied source that link, but Lebel1.Text = aaa.ToString(); Writer is me

becouse i want see result   var aaa = sfm.GetFeed(SPSocialFeedType.Personal, options);

but...Label1.Text(microsoft.office.Server.Social.SPSocialFeed) OTL....

I don't know SPSocialFeed...

maybe...nobodyknows my english question, but please helpme!!


Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>