Just as kind of strange coincidence, I was in working on some Yammer message JSON goo and realized that there were actually a couple of other important data elements that comes down in the JSON payload when you get a collection of messages from REST. That includes both querying for messages directly, as well as getting a collection back in search results. In addition to the messages themselves, there's also some info that can be used with the realtime API, as well as what it calls "references". The beauty of the references content is that it includes information about each user referenced in the collection of messages that are returned. I missed this the first time around, just one of the dangers at trying to stare at about 4k of JSON and hoping to extract everything useful out of it. Mucho love here to Fiddler and it's JSON parser for snapping me out of it. :-)
If you read the blog post on integrating search results here: http://blogs.technet.com/b/speschka/archive/2014/03/11/integrating-yammer-and-sharepoint-2013-search-results.aspx - you saw that when I got a list of search results back, I actually made a second call back to Yammer for each one to get information about the user associated with the message. By pulling in the references information I no longer need to make those additional round trips now.
So there are two things I wanted to briefly touch on here. First, I've updated the definition of the YammerMessages class; the JSON returned from Yammer is serialized into this class. I've now added additional properties into which the realtime and references information is hydrated when you call GetInstanceFromJSON. I've attached the updated class to this posting so you can download it and use it in your projects and then you will "automatically" get this new goodness. The second thing is I rewrote the section of code in the search WebAPI service I had so that it uses that References collection now instead of calling back to Yammer. I'm just going to paste in here the chunk of code from that solution that has changed; if you are going to build on that example I linked to above just plug in this new code:
foreach (YammerMessage ym in ysr.Messages.Messages)
#region used this method to get the user info by querying Yammer again
////get the Yammer User that posted each message so we can pull in
////their picture url
//string userUrl = oneUserUrl.Replace("[:id]", ym.SenderID);
//response = YammerREST.MakeGetRequest(userUrl, accessToken);
//YammerUser yu = YammerUser.GetInstanceFromJson(response);
var yUser = from YammerMessagesReferences yr in ysr.Messages.References
where ym.SenderID == yr.ID
YammerMessagesReferences ymr = yUser.First<YammerMessagesReferences>();
//add a new search results
//finds.Add(new SearchResult(yu.FullName, yu.WebUrl, yu.FirstName, ym.MessageContent.RichText, yu.PhotoUrl, DateTime.Parse(ym.CreatedAt), ym.WebUrl));
finds.Add(new SearchResult(ymr.FullName, ymr.WebUrl, ymr.UserName, ym.MessageContent.RichText, ymr.MugshotUrl, DateTime.Parse(ym.CreatedAt), ym.WebUrl));
iCount += 1;
if (iCount == 3)
So back to the question from above. Where is the poll? According to the writer, it may stem from a campaign roadmap for Ronaldo won the Golden Ball 2014 Look out for the past few days Real members are trying to "pump" for Ronaldo all the way down. Karim
Benzema, Toni Kroos, Gareth Bale, Luka Modric ... Ronaldo praised as a superhero. Carlo Ancelotti called
http://www.m88no.com/Main/Home.aspx?affiliateId=99156">M88 Ronaldo is the best player he had ever trained.
http://link138vip.blogspot.com" title="138 bet">138 bet |
http://linkbodog88vip.blogspot.com" title="bodog88">bodog88 |
http://link188betvip.blogspot.com" title="188bet">188bet |
http://dafa-bet.blogspot.com" title="dafa bet">dafabet |
http://dafa-bet.blogspot.com" title="fun88">fun88 |
http://link166betvip.blogspot.com" title="166bet">166bet |
http://linkm88vip.blogspot.com" title="m88">m88 |
"Explosive jubilant" is "super brokers" Jorge Mendes. He told Ronaldo cost £ 1 billion and is the greatest player in the history of soccer M88. He also appears to leave little friend Jose Mourinho few sentences are not they?!.
Mourinho, though there is still time feud with Ronaldo at Real (much media coverage about it), but still compliment M88 Ronaldo as a special star, Zinedine Zidane effect as in the days before the French team. Be compared with the legendary Zidane, a lawn illustrious
European world (both club level and national team shirt color), the right is too monumental to the "post-born" as Ronaldo.
Link m88 : http://www.m88no.com/Main/Home.aspx?affiliateId=99156
m88 : http://m88en.com
M88.com offer online sports games Asia, Sports Betting Asia, Sports Betting Sites Asia.
m88asia : http://m88en.net
Link to M88BET phone: m88en.com. – Register and Open Betting Account and Membership M88BET.
m88bet : http://www.linkm88vip.com
MANSION88 the house is one of the largest and most prestigious. Appeared quite early in the Asian market, the so-MANSION88 currently attracts more players.
link m88 : http://m88wiki.com
Home the M88 is the official sponsor of the football club in the Premier League
Wish you happy with the new M88
m88 casino online : http://m88free.com
Modern Thai restaurant combines outstanding traditional cuisine and a subtle modern decor with a warm welcoming ambience. Thai Restaurants in Brisbane :
http://www.watersidethainoodles.com.au , traveller reviews of Brisbane Thai restaurants and search by price, location, and more..