I posted on facebook a link to a review of a car, posted in my forum.
Thread: http://forum-alternative-antriebe.de/index.php/topic,6804.0.html
As you can see, I used [attachimg=x] a lot in this post. Facebook tries to implement a picture found in the post in his link, but not this time, as you can see in the screenshot. I think the problem are the BBCs.
Any hints? I don't know if this is really a bug or if you have time to look for it. O:-)
A link to the facebook post (if accessible) would help as well. :)
fb dev here, if the default pic isn't explicitly defined:
<!-- fb uses <meta> in example docs, it's an improper use of a <meta> though -->
<meta property="og:image" content="http://example.com/image.jpg" />
or
<link property="og:image" href="http://example.com/image.jpg" />
or
<img src="http://example.com/image.jpg" alt="use alt descriptions" />
fb grabs the first pic it finds in your page's HTML.
Sorry, it's not. None of my facebook posts is.
To automate the process you'd need to edit your template. I'm a new user and haven't looked at that part of the code yet, my comment was more an open-letter to whomever is tasked with it. Regardless, i'll take a look and get back with you on it when i have a moment.
I am using the default template, so... ;)
themes/default/Display.template.phpFind:
<a href="', $attachment['href'], ';image"
Replace:
<a property="og:image" href="', $attachment['href'], ';image"
btw, this will allow users to pick which of your attachments from that page to share from the share-dialog box (if that feature is still supported, idk, i'm a fb-dev not a fb-user).
Thank you,
@Atlas .
@emanuele: Should this edit be part of the default ElkArte installation?
IMO, Open Protocol sucks, scrap it and use schema.org instead. I mean,
compare this: http://ogp.me/ns/ogp.me.rdf
To this: http://schema.org/docs/full.html
I don't want to give the impression they can't work together, they can, but my opinion of open-graph more accurately is... why bother. Buttt, if you're autistic about using facebook tags still, this will come in handy https://developers.facebook.com/tools/debug/
In my limited playing with structured data I prefer using schema data vs open graph.
I think we could add a generic open graph image that would simply be the sites logo, something like
<meta property="og:image" content="', $context['header_logo_url_html_safe'], '" />
along with all the other head section meta-palooza
Not going to sign up just to view that fb link
But others will, or your friends will visit.
I thought the use of open graph in this instance was just so the shared link, in FB, looked all cool vs just another url.
No need to, you can read the thread withtout registering. For facebook just look at the screenshot. ;)
the fb link posted in reply #9 requires a login.
I don't see any fb link in post #9. Do you mean #10 maybe?
Yeah, I think that's what he meant. I just checked, fb requires a login to access any of their dev tools.