You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having trouble adding to my highlight reel using edit Reel.
I am able to post to my story with no issuse using ig.publish.story but when I want to add that story to one of my reels using a specific highlightid I am getting undefined as the error. I am using ig.highlights.editReel.
Code
Snippet:
const buffer = canvas.toBuffer('image/jpeg');
const publishResult = await ig.publish.story({
file: buffer
});
if (publishResult.status === 'ok' && publishResult.media && publishResult.media.id) {
const mediaId = publishResult.media.id;
console.log(`Published to Instagram story successfully. Media ID: ${mediaId}`); // Log publishing success
let highlightId = instagramHighlightReels[message.author.id];
console.log(`${highlightId}`);
//correct id printed to log
let mediaIdParts = mediaId.split('_');
let extractedMediaId = mediaIdParts[0];
console.log(`${extractedMediaId}`);
// This is the actual media ID needed and looks correct.
if (highlightId) {
try {
// Attempt to edit the reel with the given highlightId and mediaId
await ig.highlights.editReel({
highlightId: highlightId,
added: [extractedMediaId],
});
console.log(`Story added to existing Highlight Reel ID: ${highlightId}`);
} catch (publishError) {
// Here is the error logging part that might be causing the undefined log
console.error(`Error while publishing story:`, publishError.response ? publishError.response.data : publishError);
}
}
}
Error and Output
Error whil publishing story: undefined
YOUR WELL FORMATTED ERROR
YOUR OUTPUT GOES HERE
The text was updated successfully, but these errors were encountered:
General Question
Read the Notes and fill out the form.
Switch to
Preview
for reading.Notes
Your issue will be closed if you violate any rule below.
(read it if you are going to ask about it).
Form
Put an
[x]
if you meet the condition, else leave[ ]
.Question
I am having trouble adding to my highlight reel using edit Reel.
I am able to post to my story with no issuse using ig.publish.story but when I want to add that story to one of my reels using a specific highlightid I am getting undefined as the error. I am using ig.highlights.editReel.
Code
Snippet:
//correct id printed to log
Error and Output
Error whil publishing story: undefined
The text was updated successfully, but these errors were encountered: