Support

Home Forums Event Espresso Premium Open Graph issue?

Open Graph issue?

Posted: February 2, 2014 at 9:59 am


Jason Coleman

February 2, 2014 at 9:59 am

I’m not sure if it is open graph, but if I post an event to Facebook, the image is not being picked up correctly. On a single event, the image may be from a different event. If I post the events page I only get one image to choose from. All of my events have a featured image.
Is there a way to rectify this? Do I have any control over which images will be picked up? Is there some code I can add that will fix it?

http://getsoggy.com/train-now/


Josh

  • Support Staff

February 3, 2014 at 4:01 pm

Hi Jason,

By what means are you posting this event to Facebook?


Jason Coleman

February 3, 2014 at 8:39 pm

pasting the link into a facebook status update.


Jason Coleman

February 3, 2014 at 8:42 pm

the link to the events page or the link to an individual event.


Sidney Harrell

February 3, 2014 at 8:54 pm

I don’t use the facebook, but from this doc (https://developers.facebook.com/docs/opengraph/howtos/maximizing-distribution-media-content/) it looks like you could just put the meta tag in the event description with property=”og:image” and content=”link to image”.


Jason Coleman

February 4, 2014 at 8:50 am

Doesn’t work… Strangely what happens when I add an event to Facebook is, it’s picking up a different image and event from the main events page.

For example, I post the link: http://getsoggy.com/train-now/?ee=29 and what gets posted to Facebook is http://getsoggy.com/train-now/?ee=31

When the incorrect link in Facebook is clicked, it actually goes to the correct link ?ee=29, but the issue is that the incorrect image and description is showing in Facebook. Confused. Is anyone else seeing this or is it just me?

Help! My client gets way more traffic on his Facebook than his website and this is a must fix for me.


Josh

  • Support Staff

February 4, 2014 at 9:31 am

Hi Jason,

It looks like the Yoast SEO plugin is causing the conflict. The ee social add-on is outputting the correct meta tag for the image, but the Yoast SEO plugin is outputting another meta tag that is pointing to the root registration page.

What you can do is go into the Yoast SEO plugin’s social settings and uncheck the “Add Open Graph meta data” box under the Facebook tab, then save.


Jason Coleman

February 4, 2014 at 10:08 am

Argh…tried it…no dice. I was really thinking you had nailed it with that response. I’m back to the drawing board…


Sidney Harrell

February 4, 2014 at 10:42 am

Looks like there is only one og:url tag now, but there are two og:image tags. One is from our social add-on, but the other one is wp-content/themes/klass/img/facebooklogo.png. So it looks like the theme is adding it.


Josh

  • Support Staff

February 4, 2014 at 11:00 am

Oddly enough, the code that’s generating the second og:image tag was taken from this tutorial:

http://davidwalsh.name/facebook-meta-tags


Jason Coleman

February 4, 2014 at 12:15 pm

Yeah, I was checking to see if it was the way I had written the OG meta info. No dice either. Thought that maybe if the OG was pulling an image from another location I could determine if it had to do with the images on my end.
I couldn’t get the FB logo from his tut to show up either.
Still working on it…


Jason Coleman

February 4, 2014 at 12:31 pm

It’s weird, looking at the code, EE has all the social OG stuff there…Can’t figure out why it’s not working…


Jason Coleman

February 4, 2014 at 1:21 pm

Hey Guys, I figured it out using the Facebook OG debugger https://developers.facebook.com/tools/debug/ I found finally. An interesting bit for you guys to think about if anyone else has these issues. Here are my issues according to the debugger:

1) Admins And App ID Missing fb:admins and fb:app_id tags are missing. These tags are necessary for Facebook to render a News Feed story that generates a high click-through rate. – if that were added into the EE Social, it might help everyone using EE with Facebook

2) ***this one fixed individual event issue*** og:image should be larger Provided og:image is not big enough. Please use an image that’s at least 200×200 px. Image ‘http://getsoggy.com/wp-content/uploads/2014/01/282916_708558925824096_180040364_n-300×225.jpg’ will be used instead. – Apparently it just grabs whatever image fits the required dimensions and overrides everything else based on that alone.

3) Mismatch og:url and canonical url og:url tag in the header is not the same URL as rel=’canonical’ link in the html. – is this based on how the individual events reference the main events page?

* When posting the main events page, for some reason the OG social is picking up event 31…why is that? Is that something I can correct in the page itself. Will adding the OG:URL correctly override the OG Social from EE?

That’s what I found and got the individual event to display. Now I need to get the main events page to display correctly.

Thanks for helping me whittle this all down guys. EE Support Rocks!


Jason Coleman

February 4, 2014 at 1:22 pm

Hey Guys, I figured it out using the Facebook OG debugger https://developers.facebook.com/tools/debug/ I found finally. An interesting bit for you guys to think about if anyone else has these issues. Here are my issues according to the debugger:

1) Admins And App ID Missing fb:admins and fb:app_id tags are missing. These tags are necessary for Facebook to render a News Feed story that generates a high click-through rate. – if that were added into the EE Social, it might help everyone using EE with Facebook

2) ***this one fixed individual event issue*** og:image should be larger Provided og:image is not big enough. Please use an image that’s at least 200×200 px. Image ‘http://getsoggy.com/wp-content/uploads/2014/01/282916_708558925824096_180040364_n-300×225.jpg’ will be used instead. – Apparently it just grabs whatever image fits the required dimensions and overrides everything else based on that alone.

3) Mismatch og:url and canonical url og:url tag in the header is not the same URL as rel=’canonical’ link in the html. – is this based on how the individual events reference the main events page?

* When posting the main events page, for some reason the OG social is picking up event 31…why is that? Is that something I can correct in the page itself. Will adding the OG:URL correctly override the OG Social from EE?

That’s what I found and got the individual event to display. Now I need to get the main events page to display correctly.

Thanks for helping me whittle this all down guys. EE Support Rocks!

Also, meta tags in the body won’t work…


Jason Coleman

February 4, 2014 at 1:39 pm

Only issue that remains is the way that one event is being pulled into the OG protocol for the main events page. Any ideas?


Josh

  • Support Staff

February 5, 2014 at 9:17 am

Hi Jason,

What you’re seeing is the last event in the loop on the main events list page sets the og meta tags. The problem is the social add-on isn’t really able to differentiate whether it’s a single event view (where the buttons get displayed) or a view that lists the events. It’s all happening on the same page (the page with [ESPRESSO_EVENTS]).

You can work around this by setting up dedicated list of events page (You’ll create a new page and place the [EVENT_LIST] shortcode on it). You can set a featured image to this page if your theme supports it, and add a description above the [EVENT_LIST] shortcode too. This page doesn’t have to be in your main website navigation.

Now the fun part: Get open graph meta tags for this and other pages, without stomping on the single events pages.

There is a really simple little plugin that can make this happen:

http://wordpress.org/plugins/wp-open-graph-meta/

After you install it, you’ll need to make a tiny function to make sure it doesn’t conflict with the single event pages. Here’s something you can add to your custom file add-on’s custom_functions.php file or in a custom snippet plugin

<?php
add_action('wp_head', 'stop_the_og_meta_tags', 9);
function stop_the_og_meta_tags() {
	global $de_omaxis_wp_open_graph_meta;
	if (is_page('train-now')){			
		remove_action('wp_head', array( $de_omaxis_wp_open_graph_meta, 'add_elements', 11 ));
	}
}

What this will do is allow the open-graph-meta plugin to generate open graph tags for all your posts and pages, except for the event registration pages (the ee social add-on has those covered).

The support post ‘Open Graph issue?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Josh 5 years, 9 months ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!