diff --git a/OpenGraph.php b/OpenGraph.php index af2e7b6..8835a8f 100644 --- a/OpenGraph.php +++ b/OpenGraph.php @@ -112,6 +112,12 @@ static private function _parse($HTML) { if ($tag->hasAttribute('name') && $tag->getAttribute('name') === 'description') { $nonOgDescription = $tag->getAttribute('content'); } + + if ($tag->hasAttribute('property') && + strpos($tag->getAttribute('property'), 'twitter:') === 0) { + $key = strtr($tag->getAttribute('property'), '-:', '__'); + $page->_values[$key] = $tag->getAttribute('content'); + } } //Based on modifications at https://github.com/bashofmann/opengraph/blob/master/src/OpenGraph/OpenGraph.php