This project is a REST API wrapper
and data synchronization library
that can be used from .NET applications.
Starting point for this project was the YammerCrawlSync-Project published by
in his blog post
"Using the Yammer API in a .NET Client Application"
He encourages his readers with
"I think as you look into building with the Yammer API you will be able to use the sample application I’ve attached to this posting as a good starting point and pattern for creating whatever custom Yammer application you like. Now go get Yammered. :-)"
And here we are. The sample application has been split into sample and library and has got some new methods. Some parts are untouched though and still need some work.
Big thanks to Steve for providing a starting point!
REST API wrapper
Contained are wrapper classes for Yammer objects as well as classes supporting connecting to Yammer with a given user name and password.
Attention: the code connecting to Yammer automates some steps the user normally would do in the web UI and might break in the future when Yammer changes internals of the log-in process. Read
blog post for background information.
A list of things you can get from Yammer using this lib:
- list of networks the user has access to (main network, external networks)
- group members
- all users
- file attachments of messages
Per default you get this information for the users main network. You can choose an external network simply by providing a different token. Tokens for external networks are included in the list of networks.
Be sure to retrieve the data in compliance with Yammers
I needed to download data from Yammer to store and analyze it locally. After looking around for a good storage place my choice fell on
, a NoSQL database - and I don't regret it.
There are helper classes to connect to a MongoDB instance and to store downloaded data in there. Getting and storing messages is as simple as:
var messages = yammer.ReadAllMessages();
Be sure to use the data in compliance with Yammers
The demo application has two prerequisites.
Step 1 (mandatory)
To connect to Yammer with an app (e.g. the sample app of this project) you need a Client ID and Client Secret which you
by registering your app. You also need a working Yammer login which you should already have.
Note: In the app reg UI enter "https://localhost" as the "Experienced redirect" URL.
Step 2 (optional)
The demo application stores data to MongoDB. For this to work you need a MongoDB instance running locally on default port. Download MongoDB
. Unzip it to a local folder and start the server:
mongod --dbpath "C:\data"
Replace C:\data with the directory you want MongoDB to store the database in. That really is all there is to it.
For database management I recommend MongoVUE
which so far worked excellently.
If you don't want to store the data locally you need to comment out the respective parts of the demo application.