Trouble customising Facebook Share content (title, image)

Trouble customising Facebook Share content (title, image)

I have pasted the following:

                                {SCOpenGraph title=<?php echo $event->title; ?>}
                                {SCOpenGraph image=http://www.cyclemycity.com/images/stories/flash/slider2.jpg}
                                {JFBCLike href=http://www.cyclemycity.com/index.php?option=com_community&view=events&task=viewevent&eventid=<?php echo $event->id; ?> share=true}

into /com_community/templates/default/events.viewevent.php

I get the like/share buttons appearing, and the content of the share box is as per the attached (which is probably based on JFBConnect defaults, I suppose), taking the correct URL from the JFBCLike href, but the SCOpenGraph tags don't override anything...

How can I get this to work? Basically I want to get rid of the " 's Event " from the end of the title (as it does not make sense to put it on the end of an event Title, but would be fine if it was on the end of a username), and customise the image (the image shown is from the page but I want to show a static map of the event route instead).

Thanks,
Matthew

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Trouble customising Facebook Share content (title, image)

There was no image attached to the post. Please make sure you click the green arrow to insert the attachment after you upload it.

As for the tags, what you have above looks correct. Please note that Facebook can take a few days to 'see' the updated tags though. You can use the Facebook URL Debug tool, below, to verify the tags are correct *and* update Facebook's cache immediately:
https://developers.facebook.com/tools/debug

Test with that and see if it helps narrow down any issues or verifies that things are working properly.

Thanks,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24167 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Trouble customising Facebook Share content (title, image)

Thanks for the suggestions (the image is now attached from the last post). I ran the debug and got the following error:
Object at URL 'http://cyclemycity.com/index.php?option=com_community&view=events&task=viewevent&eventid=75&groupid=&Itemid=25' of type 'article' is invalid because the given value '/index.php?option=com_community&view=events&task=display&Itemid=25' for property 'og:see_also' could not be parsed as type 'url'.

I 'fixed' the error by adding http://cyclemycity.com/ to the start of all the og:see_also tags in com_community/helpers/head.php, but I'm not sure that I should be changing this as I would have thought that you'd have noticed if this was wrong. Should this file be changed, or is there a wrong setting somewhere that should be adding this to the start automatically?

I then got the following for the title:
og:title    Future weekend ride's Event

So, then I also deleted the " 's Event " from en-GB.com_community. Again, I don't really want to do this because it is probably used in other circumstances. However, I then got the og:title Future weekend ride, which is what I wanted to see, but should be getting it via the SCOpenGraph custom parameter instead of modifying the language file...

The SCOpenGraph custom parameters are putting the title and image tag into the source code, but the Facebook Share popup is not picking them up. Maybe it is not adding them to the header as they appear at the very bottom of the code (twice), in relation to the 'Social Metatags | Create Post | X' buttons (there are 2 sets, but neither seem to do anything on my page). The only place it appears near the top is a few lines after the og:see_also tags, and I'm surprised are not being picked up by the Facebook Debug or Share popup. That set of tags looks like:

<meta name="twitter:title" content="Future weekend ride"/>
<meta property="og:title" content="Future weekend ride"/>
<meta name="twitter:image" content="http://www.cyclemycity.com/images/stories/flash/slider2.jpg"/>
<meta property="og:image" content="http://www.cyclemycity.com/images/stories/flash/slider2.jpg"/>
<meta property="og:url" content="http://cyclemycity.com/index.php?option=com_community&view=events&task=viewevent&eventid=75&groupid=13&Itemid=25"/>
<meta name="twitter:description" content="A ride in the hills?"/>
<meta property="og:description" content="A ride in the hills?"/>
<meta name="twitter:card" content="summary"/>
<meta property="og:type" content="article"/>
<meta property="fb:app_id" content="..."/>
<meta property="og:locale" content="en_gb"/>
<meta property="og:site_name" content="Cycle My City"/>

Looking at the Graph API Scraped URL at the bottom of debug I see that the custom parameters are not being scraped.
The below is from the Graph API:

{
   "id": "...",
   "url": "http://cyclemycity.com/index.php?option=com_community&view=events&task=viewevent&eventid=75",
   "type": "article",
   "title": "Future weekend ride",
   "locale": {
      "locale": "en_gb"
   },
   "image": [
      {
         "url": "http://cyclemycity.com/components/com_community/assets/event.png",
         "width": 160,
         "height": 160
      },
      {
         "url": "http://cyclemycity.com/components/com_community/templates/default/images/cover/event-default.png"
      }
   ],
   "description": "A ride in the hills?",
   "see_also": [
      "http://cyclemycity.com/index.php?option=com_community&view=frontpage&Itemid=22",
      "http://cyclemycity.com/index.php?option=com_community&view=groups&task=display&Itemid=19",
      "http://cyclemycity.com/index.php?option=com_community&view=photos&task=display&Itemid=22",
      "http://cyclemycity.com/index.php?option=com_community&view=videos&task=display&Itemid=22",
      "http://cyclemycity.com/index.php?option=com_community&view=events&task=display&Itemid=25"
   ],
   "site_name": "Cycle My City",
   "updated_time": "2014-04-04T03:00:33+0000",
   "created_time": "2014-04-03T03:27:46+0000",
   "application": {
      "id": "...",
      "name": "CycleMyCity",
      "url": "https://www.facebook.com/apps/application.php?id=..."
   },
   "is_scraped": true
}

I can't work out why the custom parameters (image and title - although I hacked the title to be correct, as mentioned above) are being ignored...

Do you know why the custom tags may be ignored by the scraper even though they are in the source code?

https://www.sourcecoast.com/images/agorapro/attachments/19852/mini_share-popup.png

Attachments:
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Trouble customising Facebook Share content (title, image)

Thanks for the info. I didn't actually look at your page, I was just commenting on the tags you showed you had added.

The see_also tags are incorrect by JomSocial. They should have the full URL, and it looks like that was the cause of Facebook not being able to scrape some of your other tags.

We'll have to do a bit of investigation as to why the {SCOpenGraph title=xyz} tag isn't properly being used. If you use the social toolbar at the bottom with the Social Metatags button, it should show you the inserted tags and where they came from. If it says "Autogenerated" next to og:title, that's incorrect (that would be taking the standard meta tag). It should say "Easy Tag", which is what you used. That Social Metatags section of code is just output for super admins. Facebook wouldn't ever see that since they aren't logged into your site as a super admin.

Finally, I'd recommend trying to use the Like button to test the tags instead of the Share button. The Like button generally updates immediately with the new tags you've scanned using the URL Debug Tool. The Share button, especially if your page has been shared before, can take a few days (or longer) to update. That's to prevent updating shares that a previous user already did with unrelated content in case you make big changes.

I hope that all helps make sense,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24167 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Trouble customising Facebook Share content (title, image)

Alex,

I wonder if that is related... Although the Social Media Tags and Create Post buttons are displayed on my page they don't do anything. Is there some setting that may be wrong that would allow them to be displayed on the page but not function?

Matthew

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Trouble customising Facebook Share content (title, image)

They should do 'something' even if you have nothing configured. For the Create Post button, you need to configure the "Channels" you want to be able to post your content back to in the Channels configuration area of JFBConnect. It should still show a popup on the front end that no channels have been configured though.

The Social Meta button should show the Open Graph tags that JFBConnect is setting for the current page.

If nothing's happening, there's likely a Javascript error somewhere.. but that really shouldn't affect the Open Graph tags in general or the main issue that you are posting about.

I hope that helps explain a bit more,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24167 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests also viewing this topic
There are 0 users also viewing this topic

Board Info

Board Stats
 
Total Topics:
11697
Total Polls:
0
Total Posts:
49105
Posts today:
2
User Info
 
Total Users:
47916
Newest User:
rgfkm
Members Online:
1
Guests Online:
722

Online: 
mgitonga
Social Stream
SourceCoast Joomla Social Extensions
Friday, 25 May 2018
JFBConnect 8.0 Coming Soon! Stay tuned.
Refer and Earn

Like our extensions? You're not alone! That's why they're used on tens of thousands of websites. Now you can earn 20% of any sale you refer to SourceCoast.com.

We provide excellent documentation, well laid out sales pages and great support. All you need to do is spread the word and we'll take care of the rest.

Learn About Our Affiliate Program