Topic-icon Open Graph won't work with K2

13 years 5 months ago #28602 by ranpre
Hi there,
struggling with Open Graph and K2 for days now. Following the guide, I have:

- installed jfbconnect component
- installed and activated all plugins
- set up the facebook app, entered all FB keys
- fnalized autotune without errors

- defined object (article) and action (read) in FB as described in the guide
- defined object and action in joomla (object type: k2 item, action: news.reads, activated: FB built-in actions) as described in the guide
- object association: k2 item, unique action: one time only, 1 hr., users can disable: yes / action type: on page load, 15

However, testing fails and nothing seems to happen when reading k2 article: no popup, no items added to timeline, no activity found in the log (on both sites, Facebook and jfbconnect).

Any idea where I'm doing wrong? Please help!

Joomla 2.5.8
JFBConnect v. 4.3.2
Jomsocial 2.6.2
K2 2.6.2
The topic has been locked.
Support Specialist
13 years 5 months ago #28613 by alzander
The object type needs to be "article" and it's a built-in FB Object. The "article" object type will also need to be setup in your Facebook Developer Area. The news.reads action only works for "article" types.

If you're not getting any popups after that, please try the following:
* Make sure you're logged into your site with a Facebook user that is an administrator of your FB application
* In the Configuration -> FB API area of JFBConnect, enable the "Show Facebook API Errors on Front-End". That may show an error popup if the action isn't triggering properly and hopefully explain why.

If that doesn't work, please post (or Private Message) a URL of the K2 page we can test with.

Thanks,
Alex
The topic has been locked.
13 years 5 months ago #28655 by ranpre
Followed your advise. However, no popup showing.

Here's the link to the k2 site:
www.project-management-consulting.de

Try with article on top. To see the full article click "weiterlesen" (readmore)
The category of the object is set to "Bildende Kunst" (creative arts). You can select this category from the sidebar menu.

Cheers
Randolph
The topic has been locked.
Support Specialist
13 years 5 months ago #28662 by alzander
Something's not configured right. I don't see the Javascript we should be inserting in the page to trigger the popup for the action.

That has nothing to do with your Facebook App configuration, it's all in JFBConnect somewhere. That doesn't mean your App is right, but the Javascript needs to be working first.

Please check:
* Your object is setup for the proper K2 category (or parent category of the one containing that article)
* Your action is 'associated' to the Object you created for that category of K2 content with the proper checkbox(es)
* The Action Type is set to "On Page Load" and the Timer is set to 10 (or more).

I know you mentioned those above already, but as long as the action and object are properly associated, JFBConnect should *try* to post the action. That doesn't mean it will work, but that's the beginning. If that still doesn't work, try changing the "Object Type" for your K2 category to "testtesttest" and then check (or tell us to) the HTML for the og:type property. It should change. If not, it means your Object is not properly being used for that page.

Let us know how that goes,
Alex
The topic has been locked.
13 years 5 months ago #28675 by ranpre
Hi there,

followed your advise and, changed object type to "testtesttest". However, even then no error message, no activity in the log. Running out of ideas now.
Have sent you pm.

Cheers
Randolph
The topic has been locked.
Support Specialist
13 years 5 months ago #28681 by alzander
Randolph,
Changing it to testtesttest wasn't going to make the actions work. It will help diagnose if your object is setup correctly. Looking at your page, the Object type still looks to be "article". Can you change the Object Type to "testtesttest" again and then use Facebook's Debug Tool, below, to test the K2 Item you're working with:
developers.facebook.com/tools/debug

In there, look for the "og:type" tag. If it isn't updating to testtesttest, it means your Object is not working for the K2 article you set it up on. Check your category settings in the Object and make sure it's published. Until the page is properly setting the type tag, the action won't be able to trigger at all.

We'll try to look at your site later today if time permits, but it may not be until tomorrow that we can investigate on-site.

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

None
13 years 5 months ago #28711 by fb_100000532508192
Hi,

i am also facing the same problem. my everything in k2 seems fine, i ran the link through fb object debugger and all meta tag are present. But when viewing the article with fb admin, i don't recieve any popups etc and nothing is posted to fb.

Any suggestions,

Thanks in advance
The topic has been locked.
13 years 5 months ago #28713 by ranpre
Sorry, read your words but seems I didn't really get them. Following your advise I changed object type to "testtesttest" and tested with FB debug tool. And, indeed you are right.

As you can see from the screenshot og:type remained unchanged, still being an "article". Furthermore, there is some complaint about the metatag "author".

I'm no specialist. But, all that sounds to me as if we have to define custom object / action / properties in order to make jfbc work with K2. Am I right? And if so, how to do?

Cheers
Randolph

The topic has been locked.
Support Specialist
13 years 5 months ago #28718 by alzander
It sounds like it'd be best to look at one of your sites to understand where something's going wrong. There's definitely some confusion somewhere, but I'm not sure where it is. Hopefully when we get in, we'll be able to see what's going wrong.

If you could, please Private Message me:
* Super Admin access credentials
* The K2 article name and front-end URL that you are trying to test with

We'll do what we can to help figure out what's going wrong.

Thanks,
Alex
The topic has been locked.
Support Specialist
13 years 5 months ago #28747 by alzander
Randolph,
Thanks so much for access to your site. We were able to find the issue and implemented a fix there. We'll release an updated K2 Open Graph plugin in a few days.

Phil/Anyone reading this,
To fix, edit the /plugins/opengraph/k2/k2.php file. Around line 44, you'll find:
$query = "SELECT * FROM #__k2_items WHERE id={$queryVars['id']}";
Change that to:
$id = intval($queryVars['id']);
            $query = "SELECT * FROM #__k2_items WHERE id={$id}";
With that change, you should be able to properly start configuring K2 objects and actions.

Hope that helps, and as always, let us know your results,
Alex
The topic has been locked.