Friday 15 February 2013

Yammer API - Follow person -



Yammer API - Follow person -

how follow person using yammer api? know there follow button provided yammer embed has own styling.

tried creating open graph activity using next code, creates activity , open graph page not reflect in "following" specified user.

yam.platform.getloginstatus(function (response) {

if (response.authresponse) { yam.platform.request({ url: "activity.json", method: "post", data: { "activity": { "actor": { "name": "kavleen kaur", "email": "kavleen.kaur@abc.com" }, "action": "follow", "object": { "url": "https://www.yammer.com/abc.com/users/username", "title": "testing follow activity!", "type":"person" }, "message": "testing follow activity js sdk!" } }, success: function (msg) { alert("post successful!: " + msg); }, error: function (msg) { console.dir(msg); } }) } })

you can follow person this.

function follow(sender_id) { yam.request( { url: "https://api.yammer.com/api/v1/subscriptions" , method: "post" , data: { target_type: "user", target_id: sender_id } , success: function (msg) { } , error: function (msg) { } }); }

yammer

No comments:

Post a Comment