Post/Reply a post by Social feed REST API in SharePoint 2013

As we know, we can post/reply a post in Newsfeed for my site, but how can we apply by JS? SharePoint provide the REST API for developer to apply it.

You can use the SharePoint 2013 Representational State Transfer (REST) service to do the same things that you can do with the .NET client object models and the JavaScript object model. The REST service exposes resources that correspond to SharePoint objects, properties, and methods. To use the REST service, you build and send HTTPGET andPOST requests to the resource endpoints that represent the tasks you want to do

The endpoint URIs for most feed tasks begin with the SocialRestFeedManager resource (social.feed), followed by themy resource or thepost resource:

  • The my resource represents the current user. When used inline in the endpoint URI, it sets the context of the request to the current user. For example,http://contoso.com/_api/social.feed/my/news gets the newsfeed for the current user.


here is the result:

a. Create the UI via html

b. New and Reply a post via my js code


c. Verify the result in Newsfeed

a. you can new a post (Post)

b. you can reply a specify post via getting the post id when click any post title(Reply)

c. you can view all post by current user (All)

here is the rest api in detail:

New a post:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值