Skip to content

Developer notes

Overview · Installation · Configuration · Usage · FAQ

Table Content
?:kv_igf_media One row per synced post: company, media id, type (IMAGE, VIDEO, CAROUSEL_ALBUM), product type (FEED, REELS), caption, permalink, time, status (A shown, H hidden), pinned, image size, removed flag.
?:kv_igf_tags Product tags: company, media id, product id, pin position in percent.
?:kv_igf_log Activity (last 200 entries per company).

The connection is stored in ?:storage_data (kv_igf_conn_<company>) with the token encrypted by fn_encrypt_text(); the app id and secret in kv_igf_app_<company>. Images: images/kv_instagram_feed/<company>/<media id>.jpg (1080 px) and <media id>_s.jpg (480 px) through the CS-Cart images storage.

graph.instagram.com: /me (user_id, username, name, profile_picture_url, media_count), /me/media (id, caption, media_type, media_product_type, media_url, thumbnail_url, permalink, timestamp, children) with paging, /access_token (ig_exchange_token) and /refresh_access_token (ig_refresh_token); api.instagram.com/oauth/access_token for the code exchange. Errors with code 190 mark the token as expired.

Block type kv_instagram_feed (schemas/block_manager/blocks.post.php): templates addons/kv_instagram_feed/blocks/grid.tpl and carousel.tpl, content function fn_kv_instagram_feed_block_items(). Cache: update handlers on the add-on and product tables, request handler product_id, a callable key with the licence state, the open mode and the account header; no block cache for signed-in customers (usergroup prices). The sync log table is ignored as a full page cache tag. To change the markup, copy components/feed.tpl into your theme.

delete_product_post (removes the tags of a deleted product).

php admin.php --dispatch=kv_instagram_feed.cron, or the HTTP URL with the core cron password.