Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added some type for the HtmlHelper::Meta method to support OpenGraphProtocol #60

Closed
wants to merge 1 commit into from

3 participants

@Grafikart

No description provided.

@markstory
Owner

Why is this necessary? This seem like extra 'stuff' just hanging out in CakePHP to save a bit of work for people doing work with Facebook. Personally I think this falls outside the 80% use case we're aiming for with CakePHP.

@torifat

I also think it is not necessary. I have my own facebook helper under my facebook plugins and that has its own head(), meta() functions. Why I need those in HTML helper?

@markstory
Owner

I have to agree, this doesn't feel 'core' enough. Thank you for the patch though :D

@markstory markstory closed this
@westernmagic westernmagic referenced this pull request from a commit
Divya Manian fixes #60 81accd0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 0 deletions.
  1. +6 −0 cake/libs/view/helpers/html.php
View
6 cake/libs/view/helpers/html.php
@@ -195,6 +195,12 @@ function meta($type, $url = null, $options = array()) {
'icon' => array('type' => 'image/x-icon', 'rel' => 'icon', 'link' => $url),
'keywords' => array('name' => 'keywords', 'content' => $url),
'description' => array('name' => 'description', 'content' => $url),
+ 'og:title' => array('property' => 'og:title' , 'content' => $url),
+ 'og:type' => array('property' => 'og:type' , 'content' => $url),
+ 'og:image' => array('property' => 'og:image' , 'content' => $url),
+ 'og:site_name' => array('property' => 'og:site_name' , 'content' => $url),
+ 'fb:admins' => array('property' => 'fb:admins' , 'content' => $url),
+ 'og:url' => array('property' => 'og:url' , 'content' => $url)
);
if ($type === 'icon' && $url === null) {
Something went wrong with that request. Please try again.