


| Facebook open graph incorrect url in blog articles |
|
|
| Written by Dean Beedell | |
| Sunday, 04 December 2011 | |
|
If you have a blog on a Joomla or similar site and you find the Facebook like this button is not working properly for you then read on. Facebook has implemented a new method for linking your site and articles to a visitor's Facebook page. It uses the open graph tags to identify your site or article, for example: <meta property="og:type" content="article" /> <meta property="og:site_name" content="Lightquick Web Design - High Quality, Low Cost" /> <meta property="og:description" content="Work continues apace for those that want the Facebook button for Joomla 1.0. The older method of sharing a page using the small facebook icon is now deprecated, ie. Facebook don't want you to use it as they will turn it off some time in the future. However it works for the moment and it is easy t" /> <meta property="og:title" content="Facebook like this button for Joomla 1.0.15 content items" /> <meta property="og:url" content="http://lightquick.co.uk/facebook-like-this- button-for-joomla-1.0.15-content-items-2.html" /> <meta property="og:image" content="http://lightquick.co.uk/images/stories /facebook-example.jpg" /> So, when you click on the like this button, Facebook will add your a description of your liked link to Facebook dependant upon the information your site provides. In order for Facebook to show the right information these tags need to be populated properly. This is generally not a problem but on a blog it certainly is. On A Joomla site each blog item is an article in itself and a facebook like this button will appear next to the article. However, if you click that button then the open graph tags that will be supplied to Facebook will be those of the root blog and not the article itself. This means that the incorrect information is passed to Facebook, you will get the wrong URL, title, description and image. The question is if you have ten articles displaying on the page then how can you supply the correct open graph tags for each article? With the current implementation of the Facebook API - you can't. The only solution is to use the old Facebook share API for blogs (category or section views) and reserve the new API method for individual content items. The good thing about the old API method is that it does not rely on the og: tags but instead your site supplies the title and the URL of the article as parameters to the Facebook link at the time when the Facebook button is generated so each facebook button can have unique information associated with it. You will notice the effect on this blog page. If you are looking at the individual article: "Facebook open graph incorrect url in blog articles" then you will see the new Facebook like this button. If you are reading it on the blog page you will notice the old blue 'F' button which shares the page. The plugin/mambot used on this site differentiates between blog pages and articles, if the page is a blog it uses the old API. The mambot that is used here is a Joomla 1.0 plugin and the old FB API version can be found here : The result of the introduction of the new Facebook API requirements is that it is having an negative effect of discouraging Joomla sites from having blog pages in general, Facebook API changes are causing unforseen changes to the structures of websites and website tools used to build them.
Set as favorite
Bookmark
Email this
Hits: 492 Comments (0)
![]() Write comment
|
|
| Last Updated ( Monday, 05 December 2011 ) |
| < Prev | Next > |
|---|
![]() | Joomla Multi-Sit... Downloads: 32 Avg. Rating: | |
![]() | Steampunk Orrery... Downloads: 1146 Avg. Rating: | |
![]() | Steampunk Weathe... Downloads: 48169 Avg. Rating: | |
![]() | Cyberpunk Yahoo ... Downloads: 3296 Avg. Rating: | |
![]() | Steampunk CPU / ... Downloads: 7894 Avg. Rating: |







![]() | Today | 896 |
![]() | Yesterday | 997 |
![]() | This week | 3803 |
![]() | This month | 15872 |
![]() | All Visitors | 480823 |