igpapi — Instagram private API Simulator for Node.js (API reference) 4.14.0
    Preparing search index...

    Variable PostOpenedFromLinkScreenConst

    PostOpenedFromLinkScreen: ScreenDefinition<
        "PostOpenedFromLink",
        "screen",
        {
            feedPosition?: string
            | number;
            loggingInfoToken?: string;
            mediaId: string;
        },
        {
            carousel?: {
                children: readonly string[];
                size?: number;
                slide?: number;
            };
            mediaId: string;
            trackingToken: string;
        },
        PostOpenedFromLinkState,
        IgApiError
        | RequestError
        | ParseError
        | TransportError
        | ScreenDataError,
        PlainJsonApiHttp | MobileNavigation | AndroidThrottlingDetector,
        {
            like: (
                self: ScreenHandle,
                state: PostOpenedFromLinkState,
            ) => (
                ...args: [],
            ) => Effect<
                | {
                    data: {
                        xig_media_like: {
                            media: {
                                __typename?: ...;
                                has_liked: ...;
                                id: ...;
                                strong_id__?: ...;
                            };
                        };
                    };
                } & { raw: ActionRaw }
                | MediaLikeRestResponse & { raw: ActionRaw },

                    | IgApiError
                    | RequestError
                    | ParseError
                    | TransportError
                    | SchemaError
                    | GraphqlRootFieldMissingError
                    | ScreenEnterConcurrentError
                    | CarouselSlideNotFoundError
                    | CarouselSlidesNotLoadedError,
                | PlainJsonApiHttp
                | Signature
                | MobileSession
                | MobileDevice
                | GraphqlJsonHttp
                | MobileApplication
                | NavigationWire
                | MobileNavigation
                | MobileUserFlows
                | ScreenStack,
            >;
            openComments: (
                self: ScreenHandle,
                state: PostOpenedFromLinkState,
            ) => ScreenEdgeBound<
                ScreenEdgeShape<
                    ScreenDefinition<
                        "MediaComments",
                        "screen",
                        | {
                            carousel?: { children: readonly (...)[]; slide: number };
                            chainingSeedMediaId?: string;
                            commentSessionId?: string;
                            feedPosition?: string | number;
                            mediaId: string;
                            rankingSessionId?: string;
                            surface: "feed";
                        }
                        | {
                            chainingPosition?: string
                            | number;
                            chainingSeedMediaId?: string;
                            chainingSessionId?: string;
                            clientPosition?: string | number;
                            commentSessionId?: string;
                            mediaId: string;
                            rankingSessionId?: string;
                            storyRankingToken?: string;
                            surface: "reels";
                        },
                        | {
                            commentSessionId: string;
                            createdMediaNoteIds: readonly string[];
                            mediaId: string;
                            slide?: { index: number; mediaId: string };
                            surface: "feed";
                        }
                        | {
                            commentSessionId: string;
                            createdMediaNoteIds: readonly string[];
                            mediaId: string;
                            surface: "reels";
                        },
                        | {
                            carousel?: { children: ...; slide: ... };
                            chainingSeedMediaId?: string;
                            commentSessionId?: string;
                            feedPosition?: string | number;
                            mediaId: string;
                            rankingSessionId?: string;
                            surface: "feed";
                        } & {
                            commentSessionId: string;
                            createdMediaNoteIds: readonly string[];
                            mediaId: string;
                            slide?: { index: ...; mediaId: ... };
                            surface: "feed";
                        }
                        | never
                        | never
                        | {
                            chainingPosition?: string
                            | number;
                            chainingSeedMediaId?: string;
                            chainingSessionId?: string;
                            clientPosition?: string | number;
                            commentSessionId?: string;
                            mediaId: string;
                            rankingSessionId?: string;
                            storyRankingToken?: string;
                            surface: "reels";
                        } & {
                            commentSessionId: string;
                            createdMediaNoteIds: readonly string[];
                            mediaId: string;
                            surface: "reels";
                        },
                        | IgApiError
                        | RequestError
                        | ParseError
                        | TransportError
                        | ScreenDataError,
                        | PlainJsonApiHttp
                        | MobileSession
                        | MobileDevice
                        | GraphqlJsonHttp
                        | MobileApplication
                        | MobileNavigation
                        | JsonResponseHttp
                        | MobileUserFlows
                        | MediaCommentsReads
                        | AndroidQuickPromotionStash,
                        {
                            comment: (
                                self: ScreenHandle,
                                state:
                                    | {
                                        carousel?: ...;
                                        chainingSeedMediaId?: ...;
                                        commentSessionId?: ...;
                                        feedPosition?: ...;
                                        mediaId: ...;
                                        rankingSessionId?: ...;
                                        surface: ...;
                                    } & {
                                        commentSessionId: ...;
                                        createdMediaNoteIds: ...;
                                        mediaId: ...;
                                        slide?: ...;
                                        surface: ...;
                                    }
                                    | never
                                    | never
                                    | {
                                        chainingPosition?: ...;
                                        chainingSeedMediaId?: ...;
                                        chainingSessionId?: ...;
                                        clientPosition?: ...;
                                        commentSessionId?: ...;
                                        mediaId: ...;
                                        rankingSessionId?: ...;
                                        storyRankingToken?: ...;
                                        surface: ...;
                                    } & {
                                        commentSessionId: ...;
                                        createdMediaNoteIds: ...;
                                        mediaId: ...;
                                        surface: ...;
                                    },
                            ) => (
                                ...args: [text: string, options?: (...) | (...)],
                            ) => Effect<
                                (...) & (...),
                                (...) | (...) | (...) | (...) | (...),
                                (...) | (...) | (...) | (...) | (...) | (...) | (...) | (...) | (...),
                            >;
                        },
                        Record<never, never>,
                        never,
                        "mediaId",
                    >,
                    readonly [{ commentSessionId?: string; rankingSessionId?: string }],
                    "button",
                    AndroidScreens,
                >,
                (
                    ...args: readonly [
                        { commentSessionId?: string; rankingSessionId?: string },
                    ],
                ) => Effect<
                    AssembledHandle<
                        "MediaComments",
                        "screen",
                        | {
                            commentSessionId: string;
                            createdMediaNoteIds: readonly string[];
                            mediaId: string;
                            slide?: { index: ...; mediaId: ... };
                            surface: "feed";
                        }
                        | {
                            commentSessionId: string;
                            createdMediaNoteIds: readonly string[];
                            mediaId: string;
                            surface: "reels";
                        },
                        {
                            comment: (
                                self: ScreenHandle,
                                state: (...) & (...) | never | never | (...) & (...),
                            ) => (
                                ...args: [text: ..., options?: ...],
                            ) => Effect<(...), (...), (...)>;
                        },
                        Record<never, never>,
                        ScreenHandle,
                        "required",
                        true,
                        "mediaId",
                        AndroidScreens,
                    >,

                        | IgApiError
                        | RequestError
                        | ParseError
                        | TransportError
                        | ScreenDataError
                        | ScreenEnterConcurrentError
                        | ScreenEdgeInputError,
                    | PlainJsonApiHttp
                    | MobileSession
                    | MobileDevice
                    | GraphqlJsonHttp
                    | MobileApplication
                    | MobileNavigation
                    | JsonResponseHttp
                    | MobileUserFlows
                    | ScreenStack
                    | MediaCommentsReads
                    | AndroidQuickPromotionStash
                    | ScreenCatalog,
                >,
            >;
            repost: (
                self: ScreenHandle,
                state: PostOpenedFromLinkState,
            ) => (
                ...args: [text?: string],
            ) => Effect<
                { note: MediaCreateNoteResponse; trackingToken: string } & {
                    raw: ActionRaw;
                },
                | IgApiError
                | RequestError
                | ParseError
                | TransportError
                | SchemaError
                | GraphqlRootFieldMissingError
                | MediaRepostTextTooLongError
                | ScreenEnterConcurrentError
                | CarouselSlideNotFoundError
                | CarouselSlidesNotLoadedError,
                | PlainJsonApiHttp
                | Signature
                | MobileSession
                | MobileDevice
                | GraphqlJsonHttp
                | MobileApplication
                | NavigationWire
                | MobileNavigation
                | MobileUserFlows
                | ScreenStack,
            >;
            swipeToSlide: (
                self: ScreenHandle,
                state: PostOpenedFromLinkState,
            ) => ScreenDataMember<
                ScreenDataShape,
                (
                    ...args: [index: number],
                ) => Effect<
                    ScreenHandle,
                    ScreenDataActionFailure<
                        CarouselSlideNotFoundError
                        | CarouselSlidesNotLoadedError,
                    >,
                    MobileNavigation | ScreenStack,
                >,
            >;
        },
        Record<never, never>,
        never,
        "mediaId",
    > = ...

    ShortUrlFeedFragment:feed_short_url, a feed post opened full-screen (the short-URL feed).

    Visible: one media — a picture or video, or a carousel whose child the actions target — with the feed's like, comment, repost and share row; the comments sheet opens over it.

    Reached from: a feed post (FeedTimelinePostItem.open, source button; the 450 chain feed_timeline:1 → feed_short_url:2) or a link, which passes no feed context.

    Requests: its enter comes to front and then reads the media (GET api/v1/media/<id>/info/), the first request of the Android 450 post; the answer gives the container id, the tracking token and the carousel's children every action chains from. An answer with no media is a ScreenDataError and the open rolls back.

    Actions (each the app's own wire):

    • swipeToSlide(index) — the person swipes a carousel post to a slide (the first when they never swipe); nothing is sent, and the answer is this post shown with that slide in front, which the like, the note and the comments sheet act on. The slide lives in this open post and dies with it. A slide the post's answer does not hold refuses with CarouselSlideNotFoundError;
    • like — the post's like on the feed surface, with the build's wire (the REST like/ or the LikeMutation), the carousel child in front and the feed answer's logging token and position (the screen offers no unlike or removeRepost: the app has neither tap here);
    • repost(text?) — the like, then the note (media/create_note/v2/), both on the same carousel child. How the text reaches the note is the build's fact: a 'note-with-text' build sends it in the note; on an 'editor' build the text is the composer's to type, so a supplied text dies with MediaRepostTextNotAcceptedError (the caller's misuse, a defect) before any request and only the blank note (the path to RepostNoteEditorScreen) goes out. The presented build is 'note-with-text', so both shapes have no live client; what decides them is a 448/450 composer path (see the media section of AGENTS). Returns the note and its tracking token;
    • openComments(options) — the comments sheet over this post. The notes the composer shows were created by this process for this media (the create-note brick records each one, whichever brick asked), so the sheet reads them from its own state on enter; they are not an edge argument, and a trail step carries only the caller's options.

    The actions are the Android 450 app's, for a feed post's like, repost and mixed like-repost-comment.

    The post screen

    Guide: Likes, reposts and comments