0

Open Graph metadata

asked 2014-05-06 06:58:21 +0800

ludekcermak gravatar image ludekcermak
1

Hello, I would like to use Open Graph metadata like "og:image" or "og:title" in my zul pages. Is there a way to do it? Thx for answers. Ludek.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-04-13 01:13:21 +0800

JoseWalker gravatar image JoseWalker
0

String js = "try{ $('meta[name=description]').remove(); }catch(err){} " + "try{ $('meta[name=og:description]').remove(); }catch(err){} " + "try{ $('meta[name=og:title]').remove(); }catch(err){} " + "try{ $('meta[name=og:type]').remove(); }catch(err){} " + "try{ $('meta[name=og:url]').remove(); }catch(err){} " + "try{ $('meta[name=og:site_name]').remove(); }catch(err){} " + "try{ $('meta[name=og:image]').remove(); }catch(err){} " + "$('head').append( '<meta name="\"description\"" content="\""" +art.getsummary()+"\"="">' );"+ "$('head').append( '<meta name="\"og:title\"" content="\""" +art.gettitle()+"\"="">' );"+ "$('head').append( '<meta name="\"og:type\"" content="\"article\"">' );"+ "$('head').append( '<meta name="\"og:url\"" content="\""" +="" executions.getcurrent().getheader("referer")="" +"\"="">' );"+ "$('head').append( '<meta name="\"og:site_name\"" content="\""" +domain+"\"="">' );"+ "$('head').append( '<meta name="\"og:image\"" content="\""" +="" imgurl="" +="" "\"="">' );"+ "$('head').append( '<meta name="\"og:description\"" content="\""" +art.getsummary()+"\"="">' );";

            Clients.evalJavaScript(js);
link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-05-06 06:58:21 +0800

Seen: 13 times

Last updated: Apr 13 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More