Registermetatag() Property Instead Name For Opengraph

im facing about how to set <meta property=""> tag instead <meta name=""> absolutely correctly yii’s-style for Facebook opengraph

<meta property="og:title" content="something"/>

<meta property="og:description" content="something"/>

tryed to use Yii::app()->clientScript->registerMetaTag(‘description’, ‘example’), but it generates only <meta name="">

<meta name="example" content="description" />

maybe I’m wrong?

:lol: try this:


cs() is short function for Yii::app()->clientScript;

Wow! Thank you. Works great even wth several property og:image.

Awesome. Yes, worked like a charm. Now, I am seeing what is the best way to encapsulate this bunch of code, since Open Graph Project have some different metadata depending on the type, I am envisioning to have this code somewhere to make it usable. For example, to tag the view page, the user profiles, etc.