XF 2.2 FB sharing to a page

TPerry

Well-known member
It's nice.. but it seems o default to the logo for the site... I'd REALLY like it to be able to use an image in the post if it's available to when I share stead of my logo on that specific post. I'm not looking for it to be the first image in that thread, but the image specific to that post that I am sharing.

This
Screen Shot 2022-08-26 at 2.40.49 AM.png

would be much more attention getting than this


logo_og_optimized.webp

when I share the post that has it attached than my default site logo.
Am I missing a setup somewhere?
 
Last edited:
XF takes the og logo by default.

This template mod should do what you want: https://xenforo.com/community/resources/joyfreak-set-open-graph-image.8121/
Looks like that takes the first image in the thread? I have some threads that may have multiple images in them... but I guess beggars can't be choosers if it does only take the first as it's better than using the logo. ;)

EDIT:
Only seems to work if the image is in the first post.... if you try to use a post on down the thread that has an image it still uses the default logo apparently. :oops:
Also, if the person has linked to an outside image that is hosted on something like "Flickr" as the first image and there is an actual locally hosted image on down the thread, it takes the local hosted image even if you want it to take the first image in the thread.
And this time it worked right... o_O

Screen Shot 2022-08-26 at 4.39.52 PM.webp
 
Last edited:
@Brogan, for some reason my old addled mind remembered that XF was had a page where you could do this without going directly into the template and editing... a search/replace feature for template modifications. When was that ability removed? Or was that an add-on that did that? Would be much nicer than directly editing the templates and easier to keep up with. I know that add-ons have that ability and XF tracks those modifications.
 
Arggghhhh... well, guess I spoke to soon. Have a thread that has 2 similar images.. one is an early data capture with minimal processing and then the user posted an updated on in the same thread with additional data for the stacking and processing... and the image is MUCH better... but it STILL shares the first image.
 
Thanks.. but not really interested in yet another add-on to do something that I would have hoped would be rolled into the system, or able to be done with template edits within the system. I may grab that and see what template edits it's making if that is the way he's doing it.
I try to keep my add-on count to a bare bones minimum, and limit it to long time developers that have been around a while. I've ran into add-on bloat in the past, and it was not a fun experience... especially when some of those add-ons were no longer supported.

EDIT:
Actually, this add-on does the same thing as the template edit referenced by Brogan does... it appears to take the FIRST image in the thread, and not the one on the actual post you are trying to do.

Here is the first image in the thread and the one that is being used.

Screen Shot 2022-09-04 at 3.56.57 AM.webp

And here is the actual image I'm wanting to push out... as you can see, a definite difference, so it's easy to tell when the share screen is coming up.

Screen Shot 2022-09-04 at 3.57.10 AM.webp
 
Last edited:
Can't you edit the thread and replace the old image with the new one?

I suspect if you set it as size 0, it won't show in the thread and you can leave the original in place, if that's an issue.
 
Can't you edit the thread and replace the old image with the new one?

I suspect if you set it as size 0, it won't show in the thread and you can leave the original in place, if that's an issue.
not really... as you want to show the history of the gathering of the data. It's not a simple one shot and go type image. It can involved up to 42 captures using LRGB and 3 other filters for around 240 seconds per image capture. Then you stack those on each other, process them and come up with your image. The over the next 3 nights you repeat the captures (roughly 3 1/2 hours of capture each night) and stack that on top of the others. That is the difference you see between the two images. More data, more detail. You don't want to remove the initial image since it is the start point for comparisons to any new ones.
Being able to share the image attached to the specific post would resolve the issue, and not simply falling back onto the first image in the post (which will generally be the lowest quality one). I'm sure that image data for that specific post is kept as retrievable information somewhere that can be address... I'm just not proficient in ascertaining that data. My computer stuff is more direct hardware and OS specific skills.
 
Back
Top Bottom