$this->addOpenGraphTag('title', $article->title, false);
$document = JFactory::getDocument();
$title = $document->getTitle();
$this->addOpenGraphTag('title', $title, false);
I'm glad to hear the code fix above fixes the issue. The purpose of sending it to you was to test. We understand we don't do that now. You're the first user to bring this issue up though, so we just hadn't ever tried a different way.Problem is: even if page title is output correctly, JFB doesn't pick it up because it does not use the Joomla API for that but rather get the title directly from the article. Using the code mentioned above indeed fixes the problem, but it would be better having an option that allows to define where JFBConnect should get the title from (previously suggested option "Title Type = Page Title / Article Title").
You're correct. The only defaults are what JFBConnect ships with. Again, this is ok with us as 99%+ users don't have issues with our defaults. If you need to override our defaults, you can create one object and set it on the parent category of your articles. That will apply to all sub-articles. Then, you can create objects for any sub-categories that you want to have different settings for.Another problem will be that at this time, there is no way to specify how JFBConnect should set the OpenGraph tags for com_content by default (i.e. if no OpenGraph object was defined in JFBConnect). I think that's something missing: being able to define the default behaviour, and then only the specific behaviour through OpenGrah objects (e.g. for article in a given category etc.).
Thank you for explaining your use case. It really does help. As noted, we added this to investigate in the future. I'm honestly not sure if we'll make it an option (article title vs title tag) or just use the title tag always. For most users that don't use sh404SEF or other title tag managers, the option would be redundant and we don't want to add more confusion to the process.Regarding you suggestion "The other option, of course, is to set the article title to whatever you want the page title to be":
I've set sh404SEF to add the article category and site name to the page title, and that's what I want to have in the OpenGraph title too. Article authors should not have to handle it.
How will JFBConnect handle this? It will use the last object found? If so, it means that the objects need to be in a precise order. It will get a bit tricky as JFBConnect does not allow to change the objects order (so they must be created in the right order from the start!).If you need to override our defaults, you can create one object and set it on the parent category of your articles. That will apply to all sub-articles. Then, you can create objects for any sub-categories that you want to have different settings for.
I think it's not only for sh404SEF or other title tag managers, as Joomla itself allows to define the page title in menu items...For most users that don't use sh404SEF or other title tag managers, the option would be redundant and we don't want to add more confusion to the process.
Join our newsletter to get alerts for Joomla releases, tips and tricks and extension updates.