I've tested the module. I was having a OK message (Facebook's cache cleaned) but when comparing with https://developers.facebook.com/tools/debug/sharing the Time Scraped was indicating that in fact nothing was happening

Since there is no issue related to this yet, maybe I was not using the module the way it's intended but here's what I've done to make it work, hopefully might help someone else

in FacebookFlushCacheService.php

I've change line 77 from

$query = ['id' => $uri, 'scrape' => 'true'];

To

$query = ['id' => $uri, 'scrape' => 'true', 'method' => 'post'];

CommentFileSizeAuthor
#3 method_in_query-2871555-3.patch416 bytesnarendrar

Comments

kiwad created an issue. See original summary.

garethhallnz’s picture

Hi, thanks yes indeed it needs to be a post and not a get.

I don't think we should pass it via the query array.

I think we should simply make a post call on the httpClient

$request = $this->httpClient->post($url);  
narendrar’s picture

StatusFileSize
new416 bytes

Hi Gareth,

I used this module and issue is still there. We need to send POST request to clear cache.
Attached is the patch, which worked for me.

  • NarendraR authored 06630eb on 8.x-1.x
    Issue #2871555 by NarendraR, garethhallnz: Service not working. Add a...
garethhallnz’s picture

Status: Active » Fixed

Thank you.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.