From 055674d58750bbf35c62ec4bb2c5161200b73f4f Mon Sep 17 00:00:00 2001 From: Philipp Lang Date: Sun, 28 Nov 2021 16:09:36 +0100 Subject: [PATCH] Fixed: Dont create random string for attachment id --- classes/FacebookService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/FacebookService.php b/classes/FacebookService.php index c341a28..cb1dab6 100644 --- a/classes/FacebookService.php +++ b/classes/FacebookService.php @@ -66,7 +66,7 @@ class FacebookService extends SocialService { $href = $this->saveUrl(data_get($attachment, 'media.image.src')); break; case 'share': case 'event': - $fid = data_get($attachment, '0.target.id', data_get($attachment, 'target.id', str_random(32))); + $fid = data_get($attachment, '0.target.id', data_get($attachment, 'target.id', substr(base64_encode(json_encode($attachment)), 0, 20))); if (!data_get($attachment, 'media.image.src')) { continue 2; }