n8n-nodes-ume-v4 4.4.3 → 4.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -246,7 +246,25 @@ function extractIdFromUrl(url, serviceKey) {
|
|
246
246
|
|
247
247
|
// Facebook URLs
|
248
248
|
if (url.includes('facebook.com')) {
|
249
|
-
//
|
249
|
+
// Special handling for Facebook Like Comment service
|
250
|
+
if (serviceKey === 'like_comment') {
|
251
|
+
// Extract pfbid and comment_id from URL with comment_id parameter
|
252
|
+
const pfbidMatch = url.match(/pfbid([a-zA-Z0-9]+)/);
|
253
|
+
const commentIdMatch = url.match(/comment_id=([a-zA-Z0-9]+)/);
|
254
|
+
|
255
|
+
if (pfbidMatch && commentIdMatch) {
|
256
|
+
// Return format: pfbid[postId]_[commentId]
|
257
|
+
return 'pfbid' + pfbidMatch[1] + '_' + commentIdMatch[1];
|
258
|
+
}
|
259
|
+
|
260
|
+
// Extract post ID and comment_id
|
261
|
+
const postMatch = url.match(/\/posts\/([a-zA-Z0-9]+)/);
|
262
|
+
if (postMatch && commentIdMatch) {
|
263
|
+
return postMatch[1] + '_' + commentIdMatch[1];
|
264
|
+
}
|
265
|
+
}
|
266
|
+
|
267
|
+
// Extract pfbid from posts (for other services)
|
250
268
|
const pfbidMatch = url.match(/pfbid([a-zA-Z0-9]+)/);
|
251
269
|
if (pfbidMatch) return 'pfbid' + pfbidMatch[1];
|
252
270
|
|