Sharing images with posts - no longer working

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
thetgc
Registered User
Posts: 36
Joined: Tue Apr 25, 2017 3:51 pm

Sharing images with posts - no longer working

Post by thetgc » Fri May 03, 2019 1:28 pm

I am currently using phpbb version 3.2.6 but this problem started with the previous update.

Up until then I had been successfully using an extension called 'Social Sharing w/Dyanmic Opengraph Tags' which lets you put buttons at the bottom of posts for people to share to FB, Twitter, LinkedIn etc. Normally it would share the first image from the post along with an excerpt of the post itself. However since the last two phpbb updates this has stopped working. It will still share but not the images.

Facebook Sharing Debugger comes up with the following:
Inferred Property
The provided 'og:image' properties are not yet available because new images are processed asynchronously. To ensure shares of new URLs include an image, specify the dimensions using 'og:image:width' and 'og:image:height' tags. Learn More
Missing Properties

The following required properties are missing: fb:app_id
I don't think this is an issue with the extension itself but a change somewhere in phpbb.

I know it is not a big thing for many but social media brings a lot of visitors to my site and forum and sharing with an image is a lot more effective than sharing without one.

Anyone know what might be causing the issue?

Thanks

User avatar
david63
Registered User
Posts: 16328
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Sharing images with posts - no longer working

Post by david63 » Fri May 03, 2019 1:52 pm

thetgc wrote:
Fri May 03, 2019 1:28 pm
I don't think this is an issue with the extension itself but a change somewhere in phpbb.
It is an issue with the extension as that is what is putting the images there. The problem may have be caused by a change within the core of phpBB but you will need to obtain support for this in the support topic of the extension.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

thetgc
Registered User
Posts: 36
Joined: Tue Apr 25, 2017 3:51 pm

Re: Sharing images with posts - no longer working

Post by thetgc » Fri May 03, 2019 1:59 pm

david63 wrote:
Fri May 03, 2019 1:52 pm
It is an issue with the extension as that is what is putting the images there. The problem may have be caused by a change within the core of phpBB but you will need to obtain support for this in the support topic of the extension.
Ok but Facebook Debugger is not using the extension. It is scraping the url for the images. This worked fine before the last two phpbb updates.

User avatar
david63
Registered User
Posts: 16328
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Sharing images with posts - no longer working

Post by david63 » Fri May 03, 2019 2:02 pm

thetgc wrote:
Fri May 03, 2019 1:59 pm
but Facebook Debugger is not using the extension. It is scraping the url for the images
How is it doing that? There is nothing in the core of phpBB that would do that so it must be coming from the extension.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

thetgc
Registered User
Posts: 36
Joined: Tue Apr 25, 2017 3:51 pm

Re: Sharing images with posts - no longer working

Post by thetgc » Fri May 03, 2019 2:15 pm

No, you can take the url from any phpbb post that contains an image on any site and put that into Facebook's debugger tool here:
https://developers.facebook.com/tools/debug/sharing/ and it will scrape that url for images. You usually need to do it twice for the image to show but once it does it means you can now share that post to facebook and usually others social media and it will show the image.

If the Facebook sharing debugger tool does not pick up the image then it also will not show when you share using the extension I mentioned earlier.

So this has nothing to do with the extension itself and everything to do with phpbb.

User avatar
EA117
Registered User
Posts: 755
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Sharing images with posts - no longer working

Post by EA117 » Fri May 03, 2019 2:26 pm

thetgc wrote:
Fri May 03, 2019 1:28 pm
Inferred Property
The provided 'og:image' properties are not yet available because new images are processed asynchronously. To ensure shares of new URLs include an image, specify the dimensions using 'og:image:width' and 'og:image:height' tags. Learn More
Missing Properties

The following required properties are missing: fb:app_id
I don't disagree that "a change in phpBB" could be involved, but that this is just one of the possibilities. Unless you back off your phpBB version and prove that it still works from a phpBB 3.2.4 or earlier version, it's also reasonably explained by a change in the Facebook sharing API. I agree with david63 that starting with the extension support is the right thing, even if that investigation ultimately does conclude "a change in phpBB itself is involved."

What stands out the most to me is the "The following required properties are missing: fb:app_id" from the debugger. The image-related warning seems like just that; a warning as to why something isn't happening immediately, but will happen. Completely in line with what you and others in the extension support thread describe as "the image isn't available immediately, but is available sometime after the first use."

"fb:app_id is missing", on the other hand, might be a new requirement for use of the API, and the extension is not providing it. A quick look in the extension doesn't appear to show that it allows you to configure or pass an API key / application ID. I don't know the Facebook Sharing API to say whether this is truly a required parameter or not; I'm still just going by what the Facebook Sharing Debugger message said.

Edit: Just additional things coming to mind:

In the Facebook Sharing Debugger, are you able to perform a test of adding the suggested og:image:width and og:image:height to what is otherwise the same OpenGraph mark-up that the extension generates? Not that "that's the issue", but just thinking that maybe if height and width were specified, maybe the debugger could move on to "immediately" evaluating something that is wrong about the image, rather than the "I can't tell you yet because it's being analyzed asynchronously" warning.

Did you happen to configure the board such that Bots/Guests do not have permission to view attachments? Not that I've ever used the extension or Facebook; just picturing what must have to be happening when Facebook "reaches back" to your site.

If nothing else works out, one idea if that were happening to me is that I would setup a test phpBB board to be running where it was still publicly accessible but I could easily take a LAN trace. And see what exactly happens once Facebook tries to reach back to my phpBB site; if it's being denied download of the image (or some other phpBB-side condition), versus Facebook never does try and connect (which implies the API itself doesn't even want to), etc. Ideally a non-HTTPS test site, so that its easy to see what's happening.

thetgc
Registered User
Posts: 36
Joined: Tue Apr 25, 2017 3:51 pm

Re: Sharing images with posts - no longer working

Post by thetgc » Fri May 03, 2019 3:40 pm

Thanks for the input and suggestions.

Just to be clear. I am not taking the url generated from the extension. I am simply copying the url of the post so it has nothing to do with the extension.

All the extension is doing is taking the existing url and "posting" it to whatever social media you have chosen.

If I didn't have the extension installed it would be the same result.

So this is really an issue to do with phpbb not any extensions. The only reason I mentioned the extension in the first place is because it is a very easy way of sharing posts to social media. Perhaps I should have just left that out of the equation because it is muddying the waters somewhat.

User avatar
david63
Registered User
Posts: 16328
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Sharing images with posts - no longer working

Post by david63 » Fri May 03, 2019 4:31 pm

thetgc wrote:
Fri May 03, 2019 3:40 pm
So this is really an issue to do with phpbb
Or Facebook
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

thetgc
Registered User
Posts: 36
Joined: Tue Apr 25, 2017 3:51 pm

Re: Sharing images with posts - no longer working

Post by thetgc » Fri May 03, 2019 4:42 pm

Certainly something may have changed with Facebook but then it would also have had to change with Twitter and LinkedIn because sharing images to those networks no longer works either so my money is on something that changed in phpbb.

User avatar
EA117
Registered User
Posts: 755
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Sharing images with posts - no longer working

Post by EA117 » Fri May 03, 2019 5:09 pm

thetgc wrote:
Fri May 03, 2019 4:42 pm
Certainly something may have changed with Facebook but then it would also have had to change with Twitter and LinkedIn because sharing images to those networks no longer works either so my money is on something that changed in phpbb.
Well crap, never mind the technical response below. 😜 None of the external sites can get to your images?

This seems to make it even more likely to be a case of "my phpBB site isn't allowing bots/guests to access attachments."

Not having Guest user permission "Can download files", or not having the Guest forum permission "Can download files" in the specific forums, would block not-logged-on sessions from accessing the images. Same applies to Bots group, if whatever Facebook connects as is registered as a bot on the site.

Very important to rule that out next, before anything else.

david63 wrote:
Fri May 03, 2019 4:31 pm
Or Facebook
+1 Indeed, there is no way to assume the change in behavior was on one side versus the other. Both still have to be considered as a potential root cause, even if you want to take the extension out of the equation.
thetgc wrote:
Fri May 03, 2019 3:40 pm
All the extension is doing is taking the existing url and "posting" it to whatever social media you have chosen.
I follow you on the idea of trying to separate out "what is the extension behavior" versus "what is the Facebook behavior against phpBB." Not sure the reality allows them to be separated quite that easily though.

"All it does is submit the URL to Facebook" correctly describes what happens when you hit the actual share button. But the extension has done a bunch of work and generated a bunch of tags in the page before that, regardless of whether anyone ever actually hits the share button or not.

With the extension installed, the image to be presented isn't "well, whatever Facebook decides it wants to scrape off the page presented by this phpBB URL." The extension's PHP code has already looped through the post images and explicitly created OpenGraph tags with the first phpBB post's image as "og:image". (But without og:image:height and og:image:width, hence the warning.) Facebook didn't "do that", the extension did that.

Whether you then hit the Facebook share button on your phpBB page to send the URL -- versus entering that URL manually into the Facebook Sharing Debugger -- both actions are then asking Facebook "please read the phpBB page at this URL and honor any OpenGraph hints that exist in it." Those OpenGraph tags were created by the extension in both cases.

To test "What is the behavior of Facebook against phpBB without the extension and manually submitting the URL", you would have to disable the extension entirely; not just "avoid hitting the share button from within phpBB." i.e. You need to have the OpenGraph tags removed from the page header, and then see what Facebook does when presented with the same phpBB URL.

But whatever Facebook behavior occurs once you disable the extension, you still wouldn't be able to immediately say "that's different than how Facebook behaved against phpBB 3.2.4." Because the extension was still enabled when you were running phpBB 3.2.4. You would need to test against a phpBB 3.2.4 server without the extension running to see if "Facebook behavior changed because of something that changed in how phpBB presents its page between 3.2.4 and 3.2.6."


Note that the point of "can Bots/Guests even see the attachments to the posts on your site" still applies in all of those cases. Since it leaves Facebook powerless to get any image data regardless of whether it wanted to manually scrape it off or not, or whether og:image explicitly told it to or not. If Facebook can't access the images on the page on your specific site, it would answer every single question here. Which doesn't mean it's the problem; it's just something important to rule out.

Wish I could be better help, but I don't have a Facebook account to even see what options the Facebook Sharing Debugger is offering you. If we're lucky, someone who actually does this might have experience to contribute here. Or someone who subscribed to the extension support thread sees it, which is an additional reason posting there could be beneficial and appropriate too.

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50582
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Sharing images with posts - no longer working

Post by stevemaury » Fri May 03, 2019 5:50 pm

If a feature, which is not built into phpBB is not working, it is not a phpBB issue, even though some change to phpBB might allow the feature to work.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

thetgc
Registered User
Posts: 36
Joined: Tue Apr 25, 2017 3:51 pm

Re: Sharing images with posts - no longer working

Post by thetgc » Fri May 03, 2019 6:46 pm

@ EA117 your a star. Problem solved! It was indeed as simple as group permissions. Bot's and Guests were not able to download attachments or view certain posts.

So I put my hands up and say this one was "user error" on my part.

Thanks all for your input. At least it lead to the solution even if it were an obvious one I had failed to look at.

User avatar
EA117
Registered User
Posts: 755
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Sharing images with posts - no longer working

Post by EA117 » Fri May 03, 2019 8:17 pm

Nice. Perhaps that makes sense too, given the number of people who appear to appreciate that extension, and there weren't a bunch of "doesn't work after updating" posts already in the extension support topic. Glad you were able to get it sorted without major surgery required.

Post Reply

Return to “[3.2.x] Support Forum”