Open Graph protocol

Hey friends!

I copied this code from ogp.me. Filled in what I thought would be relevant for my page. But there is still no content when I try to post my page on Facebook. What things did I do wrong? Everything perhaps!

I’m not sure, but I don’t think it will update within minutes. Might take as long as for google to index your site, unless you tell google (or Facebook in this matter) to rescan your site. But I’m not experienced in this field.

Aha! Thanks! But do you think I did this correct?

Looks like it. Just the link to the image won’t work because it links to the ftp file path, not the www.domain.com/ … one.

Thanks! I got the path from the upload window in DuckDuckGo. How shall I retrieve the correct path?

It should be a link to the image on your published folder. Your screenshot suggests something like https://teaterfestivalen.se/publich_html/img/… and then the image file name. It usually does not contain characters like % :wink:

Best to try the link directly in the browser to make sure it’s linking to the image you want.

Ah, the browser can’t read å,ä or ö properly. Unfortunately they are in the name of the image in my public domain folder. Hence the %-characters. Maybe I need to change the name of the image?

Yes. File names should only contain letters and numbers. Hypes and underscores are ok too. But nothing else. No !$&(? or spaces :wink:

And why is there a public_domain folder at all?

Sorry I ment public_html!

Yeah but is that inside your folder structure on your server? I know we’re leaving the original question here, but on my server e.g. the structure looks like this:

That’s what Blocs exported for me and what I then uploaded on the server to see how it looks online.

Don’t mind the … dots. They’re just showing because Forklift abbreviates the complete name due to the size of the window. The dots are not in the folder name :wink:

I know very little of these things. My folder on the hosts server looks like this. They call it public_html.

I would just test it with the debug tool Sharing Debugger - Meta for Developers

2 Likes

Something strange just happened to my site. The html code created a strange border at the top, with little dots to the right. It looks the same in both chrome and firefox.

Thanks! I just did that!a few moments ago. It says that my image is all wrong. :frowning:

Try rescraping with a repeat test. Sometimes they flag an error with a URL that has never been tried before. Seems like an odd url though. I wouldn’t expect to see /public_html/ in that.

Ah, now I get it! The image I’m trying to use in the code is in the top bloc (menu-bloc or whatever it’s calles in blocs)! That’s not going to work. Firefox won’t even let me copy the image url simply because there is none?

I will have to settle with another image.

I think your correct url in the OG property should be https://teaterfestivalen.se/img/traden5.jpg

It’s the wrong dimensions though for Facebook.

What about the extra top border that comes with the code? And the little dots? Is it this that does it?
Can I just erase that?

Yes I don’t see why you would need that.

Thanks Flashman! I just copied the code from ogp.me. Will toss it away a once!

I’m getting the hang of this now! It is working! I just chose another image from one of the shows further down on the page.