Pages (2): 1 2   
Member
Member
lkjs   28-04-2011, 09:34
#1

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?

Administrator
Administrator
acrylian   28-04-2011, 09:43
#2

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.

Member
Member
lkjs   28-04-2011, 09:55
#3

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.

Member
Member
gjr   28-04-2011, 12:25
#4

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...

Member
Member
lkjs   28-04-2011, 14:29
#5

Thanks, I will try and report back my findings. Cheers.

Member
Member
lkjs   28-04-2011, 19:46
#6

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.

`

`
I just copied and pasted the sidebar include right before the footer and it linted properly.

Member
Member
micheall   29-04-2011, 06:15
#7

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.

Member
Member
lkjs   29-04-2011, 21:40
#8

Thanks for the detailed post, when up at them tomorrow will let you know how it goes.

Cheers.

Member
Member
lkjs   01-05-2011, 12:55
#9

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.

Administrator
Administrator
acrylian   01-05-2011, 13:32
#10

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).

Member
Member
lkjs   01-05-2011, 17:36
#11

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.

Member
Member
micheall   02-05-2011, 01:37
#12

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.

Member
Member
lkjs   03-05-2011, 10:48
#13

I didn't try that one, will install today and and test for you when you update.

Cheers!

Member
Member
lkjs   06-05-2011, 10:54
#14

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.

Member
Member
lkjs   06-05-2011, 11:20
#15

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.

Member
Member
lkjs   06-05-2011, 13:40
#16

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

Member
Member
lkjs   06-05-2011, 14:28
#17

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.

Administrator
Administrator
acrylian   06-05-2011, 14:43
#18

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.

Member
Member
lkjs   06-05-2011, 15:29
#19

Yea, that is what I was trying to say.

Member
Member
micheall   06-05-2011, 20:06
#20

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.

Pages (2): 1 2   
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.