Skip to content

Chance of rendering several tags og: image in pages#2

Open
mvofreire wants to merge 95 commits into
digitick:masterfrom
splashlab:master
Open

Chance of rendering several tags og: image in pages#2
mvofreire wants to merge 95 commits into
digitick:masterfrom
splashlab:master

Conversation

@mvofreire

Copy link
Copy Markdown

'renderOGMetaTags' function needs to be able to be an array, eg - when registering several images need to have the usability of thumbnails on facebook.

public function renderOGMetaTags() {
    $this->ogTags['fb:app_id'] = $this->appId; // set this app ID og tag, for Facebook insights and administration
    if (!isset($this->ogTags['og:type']))
      $this->ogTags['og:type'] = 'website'; // set website as the default type
    if (!isset($this->ogTags['og:title']))
      $this->ogTags['og:title'] = Yii::app()->name; // default to App name
    if (!isset($this->ogTags['og:url']))
      $this->ogTags['og:url'] = $this->getProtocol()."://".Yii::app()->request->serverName.Yii::app()->request->requestUri; // defaults to current URL
    foreach ($this->ogTags as $type => $value) { // loop through any other OG tags declared
        if(is_array($value))
        {
            foreach ($value as $v)
                $this->registerOpenGraph($type, $v);
            continue;
        }
      $this->registerOpenGraph($type, $value);
    }
  }

thaddeusmt and others added 30 commits December 2, 2011 15:18
…storage conflicted with the Yii session. Now uses the Yii session storage.
…s missing the second parameter (not sure why it never errored for me?)
…o the DOM, so the JS SDK was not working right with the Social Plugins
show-faces attribute doesn't exist, show_faces however, does.
… attributes to match the ones Facebook currently supports
…original Faceplugs extension was LGPL. Also added in original author's copyright notice to the modified files.
… appears this is not longer a valid parameter for any of the open graph plugins anymore.
thaddeusmt and others added 30 commits January 14, 2015 14:52
…FBML is not enabled when calling a social plugin helper class.
…ns null no helper methods are called on it causing PHP errors.
…sTokens, and updating documentation and copyrights
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants