Skip to content

Instantly share code, notes, and snippets.

@juliocamarero
Created October 6, 2012 18:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juliocamarero/3845661 to your computer and use it in GitHub Desktop.
Save juliocamarero/3845661 to your computer and use it in GitHub Desktop.
OpenGraph Attributes in Liferay Integration
Map<String, String> opengraphAttributes =
(Map<String, String>)request.getAttribute(
"LIFERAY_SHARED_OPENGRAPH");
if (opengraphAttributes == null) {
opengraphAttributes = new HashMap<String, String>();
request.setAttribute(
"LIFERAY_SHARED_OPENGRAPH", opengraphAttributes);
}
opengraphAttributes.put("type", "freezity:event");
opengraphAttributes.put("url", event.getFriendlyURL(themeDisplay));
opengraphAttributes.put("title", event.getTitle());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment