Suddenly Yammer Like button disappear from page

Frequent Visitor

All, any suggestion why Yammer Like button disappear from the page? getting api/v1/activity.json now return a 410 Gone and graph api/v1/open_graph_objects.json not found 

 

4 Replies

Sounds like a bug. You've tried refreshing the page?  Does the same error occur if you load Yammer in a different browser?

 

May be worth reporting the issue to MS Support.

Thanks for the response, This is a yammer API's issue Activity.json is deprecated and Microsoft don't have any alternate solution either we have not yet received any solution form Microsoft yammer support  

I guess maybe I'm not understand the context of the missing Like button.  What is the context of the missing button? Regular user interface? Or some other interface?

Hello Kevin, This is not a regular yammer button, we have used yammer open graph button and adding on the fly using custom javascript code.

 

https://developer.yammer.com/docs/open-graph-buttons 

 

below is teh code :

 

var createOpenGraphObjectFromUrl = function(url, title, description, image) {
var deferred = $.Deferred();
var profilePromise = lml.UserManager.getUserProfileProperties();
$.when(profilePromise).done(function(personProperties) {
yam.platform.request({
url: "https://api.yammer.com/api/v1/activity.json",
method: "POST",
data: {
activity: {
actor: {
name: personProperties.FirstName + " " + personProperties.LastName,
email: personProperties.UserName
},
action: "create",
object: {
url: url,
title: title,
image: image,
description: description
},
type: "page"
}
},
success: function(data) {
deferred.resolve();
},
error: function(jqXHR, textStatus, errorThrown) {
deferred.reject();
}
});
});
return deferred.promise();
};
var addEmbededFeed = function(url, ignoreCanonicalUrl) {
yam.connect.embedFeed({
feedType: "open-graph",
config: {
use_sso: true,
header: false,
footer: false,
showOpenGraphPreview: false,
defaultToCanonical: true,
hideNetworkName: true,
promptText: "Comment on this article.",
defaultGroupId: 0
},
objectProperties: {
url: url,
type: "page",
fetch: false,
"private": false,
ignore_canonical_url: ignoreCanonicalUrl
},
container: "#embedded-feed",
network: ".com",
success: function() {},
error: function(jqXHR, textStatus, errorThrown) {}
});
};
var likePage = function(url, title) {
var deferred = $.Deferred();
$.when(lml.UserManager.getUserProfileProperties()).done(function(personProperties) {
yam.platform.request({
url: "https://api.yammer.com/api/v1/activity.json",
method: "POST",
data: {
activity: {
actor: {
name: personProperties.FirstName + " " + personProperties.LastName,
email: personProperties.UserName
},
action: "like",
object: {
url: url,
title: title,
image: "",
description: "description"
},
type: "page"
}
},
success: function(data) {
deferred.resolve();
},
error: function(jqXHR, textStatus, errorThrown) {
deferred.reject();
}
});
});
return deferred.promise();
};