Not getting og:image for Auto Post
I hope this is an easy fix. I used to use a simple publish to facebook page that just grabbed all the og:tags and used them for the auto generated post.
It seems no matter what I do yours just doesn’t grab it. I just always get a blank image.
I don’t use featured images on posts I dynamically create the thumbnail image and apply it to og:image in the meta tag.
Please don’t tell me this only works with featured images.
This is using the FB Auto poster by the way.
Hope you can help.
How exactly do you dynamically create the thumbnail image?
It’s very hard to grab content from og:image tag, since that tag (and the whole page) is generated by WordPress template engine. Our plugin works inside admin panel way before and completely without it. To grab content from og:image, it will need to make WordPress to generate the post page specifically for that. That will be the huge waste of memory and resources and it also will result a lot of problems since a lot of plugins assume that page is generated only once.
Ah ok I understand that.
It was this sentence that sounds ambiguous ‘”Open Graph” tags are used for generating title, description and preview image for your Facebook and Google+ posts.’ which made me think it should be seeing the og:image tag.
Basically most of my posts are video embeds with no post image. So I dynamically search the post content for you tube or vimeo links then grab the video id, grab the thumbnail from the API and apply my own play watermark over the top. I see you have an option to grab video thumbs but I apply my own play watermark and yours sates it only supports youtube or though I did see vimeo in the code…
I actually managed to edit fb.php in the end to make it do what I want and run my own $imgURL = ac_get_og_image($postID); function instead of $imgURL = nxs_getPostImage($postID, ‘thumbnail’);
So all is good except I can’t update your plugin now sadly and I hope I haven’t broken and major things too.
Can I also request, (forgive me if you already have this) a %PLAINTEXT% option that doesn’t contain any http text links from the post body.
As most of my posts are video based, I dont want the video link in the FB $msg at the start of the posted message.
Thanks for the great plugin!
You can use %EXCERPT% or %RAWEXCERPT% – they remove all tags and shortcodes and leave only plain text.
Sorry you may of miss understood me.
I have tried both but they still leave any http text in.
Post body: “http://vimeo.com/videoID Hi check out this great new edit from X”
%EXCERPT% or %RAWEXCERPT%
Returns as: “http://vimeo.com/videoID Hi check out this great new edit from X”
Desired format is: “Hi check out this great new edit fro X”
So with no plain http text links in.
So you have httр://vimeo.com/videoID as a text not as link or embeded code? Then whatever you do it will be posted. How the machine can understand what part of the text you need and what you don’t need? From the machine point of view it’s all just text.
That’s what HTML tags are for – to tell the machine what is text and what is not.
You should make it:
<a href="http://vimeo.com/videoID">Hi check out this great new edit from X</a>
It will be posted as you need then.
The situation is this, I don’t want it to be a link nor does it need to be a link because word press auto embeds the plain text http link to a youtube or vimeo embed. No need for annoying short codes or anything. I let word press handle it.
That’s why its plain with no HTML, I can’t believe I am only person letting word press handle auto embeds like this.
It would be nice if one of those tags say %PLAINTEXT% maybe could strip plain http links for this situation as well.
I admit its probably a niche situation as most people probably have videos lower down after some text but for me the http link is the first thing.
For now I have just edited fb.php to strip and plain http text too for the fb message. It only takes a small bit of regex to fix this.
Thanks for the info though. I hope maybe in an update you will add this feature.
- The topic ‘Not getting og:image for Auto Post’ is closed to new replies.