instagram_connect 0.3.5 → 0.3.6
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/lib/instagram_connect/client.rb +21 -7
- data/lib/instagram_connect/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a8f007049f1317825ec16b8574067644b890352e47f04f987b779a9b893584a5
|
|
4
|
+
data.tar.gz: 714e3b145ab61b7e9e469890efe362630ddd269afae1f156050b6171ce748524
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 24d080252c2155439ee8515953a2037c071001933d0f1ff6083c66a40b7f5b7504b642df340521196f4e9c40cbb18ebaed0a89a3215abb87ed87afe06cc5ad3f
|
|
7
|
+
data.tar.gz: fc1e3e4ee479b7c6813e4e5a6bf3e567ae9b49360c8f57e5896d59e7f1528061945d7d7e5a3112420323b12d5270e272d902eb85fa234c30e9ecc1523a590e77
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,17 @@ All notable changes to this project are documented here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.3.6] - 2026-07-26
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **Conversation sync refused on Pages with deep Messenger history.** Meta prices the conversations
|
|
14
|
+
edge per row and answered even a 20-thread page with "Please reduce the amount of data you're
|
|
15
|
+
asking for" — verified live. The listing now asks for 10 at a time, drops the `updated_time`
|
|
16
|
+
field nothing ever read, and on that specific refusal retries once at the smallest useful page
|
|
17
|
+
before reporting Meta's own words.
|
|
18
|
+
|
|
19
|
+
|
|
9
20
|
## [0.3.5] - 2026-07-26
|
|
10
21
|
|
|
11
22
|
### Fixed
|
|
@@ -166,13 +166,20 @@ module InstagramConnect
|
|
|
166
166
|
# Facebook-Login path that is the PAGE, not the Instagram user — verified
|
|
167
167
|
# in production, where the Instagram user id answered with a capability
|
|
168
168
|
# error while holding a perfectly good Page token.
|
|
169
|
-
# limit defaults
|
|
170
|
-
# account with "Please reduce the amount of
|
|
171
|
-
#
|
|
172
|
-
#
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
169
|
+
# limit defaults LOW deliberately, and shrinks further on refusal. Meta
|
|
170
|
+
# rejected 50 outright on a live account with "Please reduce the amount of
|
|
171
|
+
# data you're asking for" — then rejected 20 as well on a Page with a deep
|
|
172
|
+
# Messenger history. The edge is priced per row, the cursor walk means a
|
|
173
|
+
# small page costs nothing but round trips, and updated_time is gone
|
|
174
|
+
# because nothing ever read it.
|
|
175
|
+
def list_conversations(node_id: @ig_user_id, limit: 10)
|
|
176
|
+
path = "/#{require_ig_user_id(node_id)}/conversations"
|
|
177
|
+
result = collect(path, { platform: "instagram", fields: "id", limit: limit })
|
|
178
|
+
return result if result.success? || !reduce_data_error?(result)
|
|
179
|
+
|
|
180
|
+
# One retry at the smallest useful page. If Meta refuses even this, the
|
|
181
|
+
# caller's error handling reports Meta's own words as usual.
|
|
182
|
+
collect(path, { platform: "instagram", fields: "id", limit: 2 })
|
|
176
183
|
end
|
|
177
184
|
|
|
178
185
|
def conversation_messages(conversation_id:, limit: 20)
|
|
@@ -279,6 +286,13 @@ module InstagramConnect
|
|
|
279
286
|
multipart: true, timeout: TIMEOUT))
|
|
280
287
|
end
|
|
281
288
|
|
|
289
|
+
# Meta's "please reduce the amount of data" comes back as error code 1
|
|
290
|
+
# (GraphMethodException varies), so match the message — it is the one
|
|
291
|
+
# documented, stable part of the refusal.
|
|
292
|
+
def reduce_data_error?(result)
|
|
293
|
+
result.error_message.to_s.include?("reduce the amount of data")
|
|
294
|
+
end
|
|
295
|
+
|
|
282
296
|
def url(path)
|
|
283
297
|
"#{strategy.graph_host}/#{config.graph_version}#{path}"
|
|
284
298
|
end
|