Topic-icon Open Graph not working with K2 item

Active Subscriptions:

None
Hey,

I just started setting up OpenGraph and set up a K2 item to be an "article" and the activity to "read". The problem is that I get an error in the Activity Log saying the the item has og:type of "website".

What am I doing wrong?

Thanks!
The topic has been locked.
Support Specialist
13 years 4 months ago #30333 by alzander
Not sure. My guess is that there's another extension re-including the Facebook Open Graph tags on the page, and that's causing a conflict. Can you post, or Private Message, the URL of a K2 item that's showing this problem? We'll gladly help diagnose it for you.

Thanks,
Alex
The topic has been locked.
Support Specialist
13 years 4 months ago #30369 by alzander
There's a few issues that are causing your problem. First, the private message you sent me had a link to the following page:
/online-kurs/inspirasjon/item/7-video-5-jeg-er-rolig

That page is for registered users only, as I'm redirected to:
/component/users/?view=login
On that page though, I get the following PHP error:
Fatal error: Call to a member function get() on a non-object in /home/kultuurc/public_html/heart/templates/<YOUR_TEMPLATE>/index.php on line 8
That's not related to JFBConnect, just wanted to let you know.

However, the overall issue relates to the fact that the page is for registered users. Facebook has a search 'bot' that scans your pages for the Open Graph tags. Since your page is redirecting the 'bot' to the login page, that's what Facebook is seeing. Since that page has an error, it's not able to see any Open Graph tags. So, you'll need to:
1) Fix that error on the login page. I'm not sure what's causing that.
2) You may want to not make your K2 content for registered users only, if possible. Like that, Facebook won't be able to scan and see the contents of your registered pages. We're investigating a way to let Facebook 'peek' into registered content pages, but for now, it's just not possible.

Hope that helps explain the issues,
Alex
The topic has been locked.
Active Subscriptions:

None
13 years 4 months ago #30378 by leadershipbyheart
Hey,

We had a membership solution installed, but now all plugins are disabled and the specific content restriction is removed, but the error is still there. When I use JFBConnect to login, the page is available - I'll contact the membership provider to see what they say, but they also said it wasn't their fault. :)

Are you 100% sure it's nothing to do with JFBConnect? :)

About the restricted articles, K2 and Facebook, thanks for the info - that makes perfect sense now. I'll have to find another way of fixing it.
The topic has been locked.
Support Specialist
13 years 4 months ago #30387 by alzander
I don't think it has to do with JFBConnect or with your membership component. It seems to be coming from your template. The file mentioned is: public_html/heart/templates/<YOUR_TEMPLATE>/index.php
(I hid the template name, since it's similar to your site name, and I don't think you want that exposed).

Look in that file at line 8 and see what is trying to be done. That's where the error is coming from, not from any extension.

Hope that helps get you started,
Alex
The topic has been locked.
Active Subscriptions:

None
13 years 4 months ago #30388 by leadershipbyheart
You're completely right - we changed template and the problem disappeared...

Thanks for your help!
The topic has been locked.
Support Specialist
13 years 4 months ago #30394 by alzander
Awesome! Glad to hear we got you going. Should you need anything else, just let us know.

Finally, if you haven't already, please consider leaving a rating and review for JFBConnect, or our support, on the Joomla Extension Directory. It certainly isn't required, but is very appreciated:
extensions.joomla.org/extensions/social-...ook-integration/7215

Thanks,
Alex
The topic has been locked.