Quantcast
Channel: Developing Apps for SharePoint 2013 forum
Viewing all articles
Browse latest Browse all 8089

Search for Social HashTags and show the related post with its image from the search results with SharePoint 2013 CSOM (JavaScript)

$
0
0

Hi,

We are developing a SharePoint hosted app using mostly the CSOM (JavaScript) codings.

We are in need of retrieving news feed posts which are posted with particular Social Hash Tags. But it seems there is no any direct way to get the social posts tagged with a known hash-tag. According to what I have found, the approach is toutilize search to get the social posts tagged with the known tags.

I used the following way to obtain the search results:

    var keywordQuery = new Microsoft.SharePoint.Client.Search.Query.KeywordQuery(context);
    keywordQuery.set_queryText("Tags:'" + tagName + "'");
    var searchConversationsSourceId = "459dd1b7-216f-4386-9709-287d5d22f568";
    keywordQuery.SourceId = searchConversationsSourceId;

With some debugging I found out that the result objects contain following properties:

FullPostBody
RootPostOwnerID
RootPostUniqueID
MicroBlogType
RootPostID
ListItemID

But I cannot find any specific property that relates with the Thread ID in the SocialFeedManager.

I need to reconstruct the Thread for a post returned in the above search (I need to show the post text and image). For that I need to get the feed with the SocialFeedManager, and then use the GetFullThread()  method of the SocialFeedManager to pull out the particular thread I want. But for that I need the correct Thread ID to provide into that method.

So does anyone know how to obtain the thread ID from the search results?

Or is there any other way that I can try to accomplish this task?

Pleases help me...

Thanks.



Viewing all articles
Browse latest Browse all 8089

Trending Articles



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