I have several content types that are scheduled events. As things are now, I can only select article as the og type. According to http://developers.facebook.com/docs/reference/opengraph/object-type/event, this is what it should be listed as. I tried to hack the module myself, and I was able to add the event og type. Facebook didn't like it because the page also needs event:start_time. My node does have the start date time, but if I'm reading the Facebook error correctly, it want's it in php date_time format. Mine is in a readable format.
Do you think this could be possibly added to the module?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wxman’s picture

Title: I would like to use og type event » I would like to use og type event and publisher

I also found that article:publisher is becoming more important as of late. I hacked the module metatag_opengraph.metatag.inc adding this:

  $info['tags']['article:publisher'] = array(
    'label' => t('Open Graph article publisher'),
    'description' => 'Facebook address of website publisher',
    'class' => 'DrupalTextMetaTag',
    'group' => 'open-graph',
    'element' => array(
      '#theme' => 'metatag_opengraph',
    ),
  );

This seems to work fine.

DamienMcKenna’s picture

Title: I would like to use og type event and publisher » Add more Open Graph tags & options
Version: 7.x-1.0-unstable3 » 7.x-1.x-dev

Lets focus this on identifying other OG tags & tag options that would be useful to have.

wxman’s picture

It seem like they have been changing things around a lot lately. I've been trying to keep up.

paulkittredge’s picture

According to https://developers.facebook.com/blog/post/2013/06/19/platform-updates--n..., Facebook now has article:publisher and article:author. Can those be added to the next release?

Thanks!

valkum’s picture

Hmm i think the best for a short result would be some hooks in _metatag_opengraph_type_options and metatag_opengraph_metatag_info

Then you can add more Modules, which will add specific og types etc.

valkum’s picture

Status: Active » Needs work
FileSize
1.24 KB

Here is some work done by me.

Added a module for opengraph events. But there ist a bug with event:fbid (https://developers.facebook.com/bugs/321976687938505?browse=external_tas...)

Patch needs a bit more work.

Check for token with date for event:start_time in format: e.g 2013-09-07T16:00:00+0200 or create one.

Maybe move event tags into new metatag group but its only a visual thing.

Simon Georges’s picture

valkum’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work
skruf’s picture

Here's a patch to add the article publisher and author tags as specified here:

https://developers.facebook.com/blog/post/2013/06/19/platform-updates--n...

skruf’s picture

Issue summary: View changes
Status: Needs work » Needs review
DamienMcKenna’s picture

Status: Needs review » Needs work

There's a tiny typo: "Links and article" should be : "Links an article"

skruf’s picture

Status: Needs work » Needs review
FileSize
1020 bytes

Updated with typo fix

DamienMcKenna’s picture

Status: Needs review » Needs work

Another small typo - it should be "author's" and "publisher's".

Also, would you mind expanding this to cover the other article sub-tags?

DamienMcKenna’s picture

skruf’s picture

Assigned: Unassigned » skruf

Sure, I'll take this on.

DamienMcKenna’s picture

Other tags to add:

  • article:published_time - datetime - When the article was first published.
  • article:modified_time - datetime - When the article was last changed.
  • article:expiration_time - datetime - When the article is out of date after.
  • article:author - profile array - Writers of the article.
  • article:section - string - A high-level section name. E.g. Technology
  • article:tag - string array - Tag words associated with this article.

Also, any meta tags that are marked as "array" need to be flagged as "multiple" in the API so that they can properly handle multiple values.

DamienMcKenna’s picture

Status: Needs work » Needs review
FileSize
5.69 KB

This adds the following meta tags:

  • article:publisher
  • article:author
  • article:section
  • article:tag
  • article:published_time
  • article:modified_time
  • article:expiration_time
  • og:determiner
  • og:updated_time
  • og:see_also

It also:

  • Adds another xml namespace for the new "article" namespace.
  • Adds a namespace to metatag_facebook for the "fb" namespace.
  • Assigns default values for article:published_time, article:modified_time and og:updated_time for nodes.
DamienMcKenna’s picture

Status: Needs review » Needs work

Need to add another few tags from http://ogp.me.

DamienMcKenna’s picture

Adding this to the 1.0 release plan.

DamienMcKenna’s picture

Status: Needs work » Needs review
FileSize
9.98 KB

This also adds the following meta tags:

  • og:image:type
  • og:image:width
  • og:image:height
  • profile:first_name
  • profile:last_name
  • profile:username
  • profile:gender
DamienMcKenna’s picture

FileSize
15.1 KB

This one also adds the following:

  • og:locale:alternate
  • og:audio
  • og:audio:secure_url
  • og:audio:type
  • book:author
  • book:isbn
  • book:release_date
  • book:tag
DamienMcKenna’s picture

FileSize
19.19 KB

Improves the patch from #22.

DamienMcKenna’s picture

Status: Needs review » Fixed

Committed.

  • DamienMcKenna committed 33bb2db on 7.x-1.x
    Issue #2026343 by DamienMcKenna, skruf, valkum, wxman: Added many more...
DamienMcKenna’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.