This project is read-only.
1

Closed

Web App Example Not working

description

Your sample web project is not working. I guess this has to do with Yammer changing something the authentication process on december 2013.

In the AuthCode action, the myYammer.GetToken() returns null:
var myConfig = this.TempData["YammerConfig"] as ClientConfigurationContainer;
myConfig.ClientCode = code;
var myYammer = new YammerClient(myConfig);
var yammerToken = myYammer.GetToken(); // returns null
Closed Oct 6, 2014 at 7:59 PM by RaynaldM

comments

TonyHell wrote Oct 3, 2014 at 3:23 PM

Very cool Project!

To make it run we needed to Change the YammerRequest class in YammerClient.cs.
There´s a comment that request.AddBody(objectForRequest); should be used instead of the complex AddObject-method but with that code you won´t get an AccessToken.
Replace the AddBody by request.AddObject(objectForRequest); - then the project works!

//Request Format set to JSON and AddBody instead of AddObject
//are necessary to allow posting complex objects (such as the Activity object)
request.RequestFormat = DataFormat.Json;
// Do not use this: request.AddBody(objectForRequest);
// This works:
request.AddObject(objectForRequest);

Credits goes to Andi Lillich (atwork.at) - thx for finding and fixing!
hth!
best, Toni

wrote Oct 6, 2014 at 7:59 PM

Résolu à l'aide de l'ensemble de modifications 37591 : Add a parameter on YammerRequest to use addBody or addObject for request