Facebook Url Lint Problem (zpFocus)

I am using zpfocus theme together with zenpage. When linting the Url of a gallery image, I get the text of the truncated description on the "News" sidebar instead of the text on the gallery. So if you post the link to the gallery image page in facebook, the link description is posted as something else entirely unrelated.

Facebook provides the following errors:
Required Property Missing og:title is required
Required Property Missing og:type is required
Required Property Missing og:image is required
Required Property Missing og:url is required

http://developers.facebook.com/tools/lint

When linting the URLs of the News pages I get the same errors, but the correct description pops up.

Facebook devlopers all crying about how URL linting never works right, and in facebook documentation it isn't very helpful. I was wondering if anyone new a simple solution to this?

I have hacked a fair bit of the theme, but can't figure this one out. I am hesitant to bother with facebook plugins if all I will get is incorrect lints, but maybe these plugins solve the issue somehow?

Comments

  • acrylian Administrator, Developer
    Sorry, I am not on Facebook and I have to admit that I don't understand what issue you are actually talking about... A user made a collection of Facebook plugins you should try.

    Whatever your issue is it may be theme related so I added the name to the topic.
  • lkjs Member
    No sweat, Facebook integration is dirty business always. Even if you knew answer I have a feeling somehow it wouldn't work. There are a lot of threads over there of people doing it exactly to specifications and Facebook still spitting out wrong information on the links. :-)

    I think it is an important issue though, you should try putting in any url with an image and text into this link: http://developers.facebook.com/tools/lint

    That is to test how your image and link will appear when posted by someone on facebook. Facebook sometimes gets confused and allows you to choose which image is correct before posting, but with text, if the description is wrong, you are out of luck.
  • gjr Member
    Although not a zenphoto or zpfocus issue, facebook is probably displaying the first bit of meaningful text found in the source code order. I can't remember offhand if the sidebar comes first in the source order of zpFocus, but if it does, that is probably why facebook is picking it up thinking that is the best text description of the link. If this is important to you, you may need to modify the html so that the main content comes first in the html structure, rather than the sidebar. That is my best guess...
  • lkjs Member
    Thanks, I will try and report back my findings. Cheers.
  • lkjs Member
    Well you are absolutely spot on gjr. I was thinking meta properties might need to be injected to each page.

    However, I can't figure out how to load sidebar in a different order without messing up the css. When I load it last the whole theme mirrors itself.

    `
    <?php include("header.php"); ?>
    <?php include("sidebar.php"); ?>


    `
    I just copied and pasted the sidebar include right before the footer and it linted properly.
  • What you're attempting to fix can be done without changing the loading order or layouts of your page. It is done via meta tags, the reason it's grabbing news/sidebar etc first is likely because you don't have a description meta-tag. So then Facebook has to guess, and as you see is normally wrong.

    The other meta keys that you mention are keys that help you to direct the different aspects of sharing through Facebook.

    As acrylian mentioned I did do up a suite of Facebook plug-ins for integration with Facebook that I try to keep as up-to-date as possible with the Facebook api etc.

    Take a look here.

    Edit:
    As a note, if you want to just add the meta-tags refer to this documentation for what they mean and how to populate them.

    Also, if you want, take some time and lint some of my pages randomly and see what comes up.
  • lkjs Member
    Thanks for the detailed post, when up at them tomorrow will let you know how it goes.

    Cheers.
  • lkjs Member
    Your urls lint ok, but your plugins don't seem to solve problem.

    You are right, it needs meta properties, and this is best solution. I fail badly at the php trying to associate various properties in it. I don't think changing the loading order is a solution unless I missed something, because the only way I can think of to keep the formatting is javascript and that seems bad solution.

    Perhaps a feature like in joomla to just put the meta tags for each page in would be best solution for zenphoto? What is best way to individually put in the the meta properties for each page? No luck trying anything that way.
  • acrylian Administrator, Developer
    There is a html meta tag plugin which you could adjust (it uses standard html ones and does not have these `property="og:title"` parts therefore).
  • lkjs Member
    Head is exploding trying to make hack. I will ask my friend who is php coder to take a look. I think it should work if adding the og properties.
  • The plugins would address what you're trying to do, but I wasn't specific enough. The zenFBcommon plugin loads all the meta-tags you need. I noticed though while looking at it that it doesn't address the description or author tags. I'll modify the plug-in in the next few days to incorporate those.

    In the mean time you can address it like acrylian said by loading the html_meta_tags plugin. It will at least address your description issue.
  • lkjs Member
    I didn't try that one, will install today and and test for you when you update.

    Cheers!
  • lkjs Member
    I must have botched something in a previous attempt, because now with your plugin comments.php enabled it fixes the description.

    However, in the zpFocus theme it still takes the cache from the sidebar rotator. I think the description being right is the main thing however! You can still scroll through to find correct image when you post.
  • lkjs Member
    Also, when posting a comment to facebook, no image appears at all from the comments. I will play around with the other plugin extension to see if that changes anything.
  • lkjs Member
    `
    if (getImageThumb()) {
    echo '';
    } else {
    $logo = getOption('zenFBcommon_defaultlogo');
    if ($logo != NULL) {
    echo '';
    `
    For some reason when linting an url the thumbnail comes up blank. The og:image is linted as:

    http://www.mysite.com/zenphoto/zenphoto/cache/album/image_100_cw85_ch85_thumb.jpg

    instead of:
    http://www.mysite.com/zenphoto/cache/album/image_100_cw85_ch85_thumb.jpg
  • lkjs Member
    I replaced FULLWEBPATH with 'http://www.mysite.com' and it seems to be working. I guess when you call getImageThumb() it already includes the relative directory zenphoto is in, but not the http part of it. Adding FULLWEBPATH points to the relative directory again hence the duplication.

    Correct me if I am wrong.
  • acrylian Administrator, Developer
    Might be a "bug" in hte plugin as FULLWEBPATH returns `www.domain.com` plus the folder if you installed Zenphoto in one and not in the root.
  • lkjs Member
    Yea, that is what I was trying to say.
  • Hmm... I see it doubled up on the folder name.

    My guess is that getImageThumb includes the directory structure link to the cached thumb, but then FULLWEBPATH also includes part of the directory structure. I'll fix that up in a few.
  • Alright, updated to fix.

    Changelog & download here
  • Just a general note here. Something I have learned the hard way. If you are doing things involving URLs, it is a good idea to have two test installations--one that is in the root of the webserver and one in a subfolder. Seems there are often issues with WEBPATH beind either empty or not.
  • Yeah, I moved a copy of my trunk test install under a subfolder so I can test there as well.
  • lkjs Member
    Been afk, will install it soon and see what happens.

    The double directory reference or whatever it was seemed a weird logic error. I looked at it for a good 45 minutes trying to see what was wrong. I guessed the same thing about getimagethumb but dont know enough about php to get solution.

    Thanks for hard work, and if I'm ever not bust will at least buy you some groceries. This is a nice friendly place and makes me want to learn more and recommend ZP. I don't get such nice help even from things I pay a lot for.

    Cheers.
  • micheall: unfortunately there is a problem loading Your webpage to download the updates. It seems that I have the same problem and needs that lkjs does.
  • Yeah I'm working with my provider. My VPS keeps crashing randomly. As soon as the site comes back up I'm gonna transfer domains over to a new VPS. I'll update once the site is back up and running.
  • @oiorokko The site is restored, but hold a day or two on upgrading. I'm just wrapping up the final touches on some more updates to the zenFBSuite. Incorporating some changes for the upcoming switch to 1.4.1. Just watch for the update notice. I'll probably have it up either today or tomorrow.
  • Thank You very much. I already did the upgrade, but it is no hard thing to do it once more.

    Still I have one question about the Like button - If I click "Like", is posts it on my wall in FB but does not display it on the "main wall" where everyone could see it?!. If You could understand what I mean.
  • @oiorokko
    Often times you're going to have to wait for the Facebook crawler to scrape your site. Make sure you've set the admin/app ID's as linked to in the zenFBcommon plugin. They provide links to the explanation pages as to how/why you need to do this as well.
Sign In or Register to comment.