=== Feednetic – Social Feed Gallery & Carousel ===
Contributors: feednetic
Tags: instagram feed, facebook feed, instagram, social feed, instagram gallery
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show an Instagram feed or Facebook Page feed as a fast grid or carousel gallery with a lightbox. Posts and images are stored on your own site.

== Description ==

**Feednetic shows your Instagram feed and your Facebook Page feed on your WordPress site** as a responsive photo grid or a carousel slider, with a lightbox, a profile header and a Follow button. Connect an Instagram Business or Creator account or a Facebook Page in one click, with no Meta developer app, and place the feed with the block, a shortcode or the Elementor widget.

Feednetic is built to be fast. Posts are synced in the background and saved in your WordPress database, and images are resized, converted to WebP and served from your own uploads folder. Feeds are rendered on the server, so visitors never wait for Instagram or Facebook. If a sync fails, the last good posts keep showing, so a feed is never blank.

= Features =

* **Instagram feed** from Business and Creator accounts: photos, carousel posts, videos and Reels (shown as a thumbnail with a play mark)
* **Facebook Page feed** from Pages you manage: photo and video posts, plus link and text-only posts if you turn them on
* Connect **unlimited Instagram accounts and Facebook Pages**, and create **unlimited feeds**
* Two layouts: a responsive **grid** (columns per desktop, tablet and mobile) and a **carousel**
* **Lightbox** with the caption, carousel navigation and a link to the original post
* Feed **header** with profile picture, name, follower count and bio, plus a **Follow** button
* **Load more** button, up to 50 posts per page
* Live preview in the feed editor, with desktop, tablet and mobile views
* Style settings: gap and corner radius
* Gutenberg **block**, **shortcode** `[feednetic id="12"]` and **Elementor** widget
* Every feed has its own CSS class (`.feednetic-feed-{id}`) for styling in your theme's Additional CSS
* Theme template overrides: copy a template into `your-theme/feednetic/` to change the HTML
* Automatic sync every 30 minutes, 1, 3 or 6 hours, plus **Sync now**; Instagram tokens are renewed automatically

= Fast and private =

* No jQuery; the small front-end script loads only on pages that show a feed
* Images are served from your own site in WebP, with responsive sizes and lazy loading
* Feeds work with JavaScript turned off
* Visitors' browsers contact no social network until they click a video or a link
* Works with WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache and SiteGround Optimizer: their cache is cleared when posts change
* Keyboard-accessible lightbox and carousel, with alt text on every image
* No cookies and no visitor tracking on the front end

= Feednetic Pro =

Everything above is free, with no limits on accounts or feeds. Feednetic Pro is a separate add-on (https://feednetic.io/pricing) that adds:

* Several accounts in one feed, including Instagram and Facebook mixed, with an "All accounts" header
* Two more style templates: Minimal and Rounded
* Hide and pin individual posts
* Keyword and hashtag filters for the posts in a feed
* Shoppable links ("Shop now" on posts and in the lightbox)
* Like and comment counts on hover
* AJAX load mode for heavily cached pages
* Feed export and import

= How to set it up =

1. Install and activate Feednetic.
2. Go to **Feednetic → Connected Accounts**, click **Connect account** and choose Instagram or Facebook. Log in with Meta and approve read-only access.
3. Go to **Feeds**, create a feed, pick the account, the layout and the style, and save.
4. Add the **Feednetic** block to a page, or paste the shortcode shown in the feed list.

Documentation: https://feednetic.io/docs · Setup guide: https://feednetic.io/docs/setup-guide

== Installation ==

1. In your WordPress admin go to **Plugins → Add New Plugin**, search for "Feednetic" and click **Install Now**, then **Activate**. (Or upload the plugin ZIP under **Plugins → Add New Plugin → Upload Plugin**.)
2. Open **Feednetic** in the admin menu.
3. Go to **Connected Accounts**, click **Connect account** and choose Instagram or Facebook. Log in with Meta and approve read-only access.
4. Go to **Feeds**, create a feed, pick the account, a layout and a style, and save.
5. Add the **Feednetic** block (or the Elementor widget) to a page, or paste the shortcode shown in the feed list, e.g. `[feednetic id="12"]`.

Requirements: WordPress 6.6+, PHP 7.4+ and the GD or Imagick image library. WP-Cron must be able to run (or use a real server cron).

== Frequently Asked Questions ==

= How do I add an Instagram feed to WordPress? =

Connect your Instagram account under **Feednetic → Connected Accounts**, create a feed under **Feeds**, then add the Feednetic block to any page or post (or paste the feed's shortcode). The posts appear as soon as the first background sync has downloaded the images.

= What kind of Instagram account do I need? =

An Instagram **Business** or **Creator** (professional) account. Feednetic uses Meta's official Instagram API with Instagram Login, which only works with professional accounts. You do not need a Facebook Page or a Meta developer app.

= Can I use a Personal Instagram account? =

Not directly. Meta's API no longer gives access to Personal accounts. Switching to a Creator or Business account is free and takes a minute in the Instagram app: **Settings → Account type and tools → Switch to professional account**. Your posts and followers stay the same. Step by step: https://feednetic.io/docs/setup-guide

= How do I show a Facebook Page feed? =

Click **Connect account → Facebook**, log in and choose the Page. You must be an admin of the Page. Personal Facebook profiles and Groups are not supported by Meta's API.

If Feednetic says "No Pages found", the Page is probably managed only in Meta Business Suite: add yourself to the Page directly as an admin, then connect again. See the setup guide: https://feednetic.io/docs/setup-guide

= Does it show videos and Reels? =

Yes. Videos and Reels appear in the feed as their thumbnail with a play mark. Clicking one opens it on Instagram or Facebook, so no video player is loaded on your page until a visitor asks for it.

= Can I show a hashtag feed? =

No. Feednetic shows the posts of the accounts and Pages you connect. Filtering those posts by keyword or hashtag is part of Feednetic Pro.

= Will it slow down my site? =

No. Visitors get HTML that was built on your server from posts already saved in your database, with images in WebP from your own uploads folder and lazy loading. The front-end script has no dependencies and loads only on pages that show a feed. No API call is made during a visitor's page view.

= What happens if Instagram or Facebook is down, or my token expires? =

The feed keeps showing the last posts that were synced. Instagram access tokens are renewed automatically before they expire. If Meta revokes access (for example after a password change), the feed still shows its posts and the admin is asked to reconnect the account.

= How does syncing work? =

After you connect an account, Feednetic fetches your latest posts in the background (with WordPress's Action Scheduler) and then checks for new posts on the schedule you choose in **Settings → Sync**: every 30 minutes, 1 hour (default), 3 or 6 hours. New images are downloaded, resized and saved in `wp-content/uploads/feednetic/`. You can also click **Sync now** at any time.

= How many accounts can I connect? =

As many as you like, in the free plugin: any number of Instagram accounts and Facebook Pages, each syncing on its own. Each feed shows one account or Page, and you can create as many feeds as you like. Showing several accounts mixed in one feed is a Feednetic Pro feature.

= Is it GDPR friendly? =

Posts, images and access tokens are stored only in your WordPress database and uploads folder; Feednetic's servers never store them. Access tokens are encrypted. Visitors' browsers make no requests to Instagram or Facebook until they click a video or a link to the original post. Feednetic sets no cookies on the front end and does not track visitors. Suggested text for your privacy policy is added to WordPress's privacy policy guide (**Settings → Privacy**). See "External services" below for what is sent where.

= Does it work with page caching plugins? =

Yes. When new posts arrive, Feednetic clears the cache of the pages that show the feed in WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache and SiteGround Optimizer.

= Can I customise the design or the HTML? =

For the look, use the feed editor's Style settings, or add CSS in **Appearance → Customize → Additional CSS** (or the Site Editor's Styles) and target the feed's class, `.feednetic-feed-{id}`, shown in the feed editor's Style tab.

For the HTML, copy the template you want to change from `wp-content/plugins/feednetic/templates/` into a `feednetic/` folder in your theme (ideally a child theme), keeping the same file name and sub-folder, for example `your-theme/feednetic/post.php` or `your-theme/feednetic/layouts/grid.php`. Feednetic uses your copy instead of its own (child theme first, then the parent theme). Only Feednetic's own template files can be overridden, and they still receive escaped data.

= Why do I connect through feednetic.io? =

Meta only gives API access to approved apps. Feednetic's connection service holds that app, so you don't need to create your own Meta app. It is only used while you connect an account; after that your site talks to Meta directly. See "External services".

= What happens when I delete the plugin? =

By default your feeds and settings are kept, in case you reinstall. To remove everything (accounts, feeds, posts, images, settings and scheduled jobs), turn on **Settings → Delete all data when the plugin is deleted** before deleting the plugin.

== Screenshots ==

1. An Instagram feed in a grid, with the profile header, Follow button and Load more.
2. The same Instagram feed as a carousel.
3. The lightbox: the full image, the caption, carousel navigation and a link to the original post.
4. A Facebook Page feed in a four-column grid.
5. The feed editor: layout, columns, number of posts, header and buttons, with a live preview.
6. Connecting an account: choose Instagram (Business or Creator) or a Facebook Page, with read-only access.
7. Connected Accounts: every Instagram account and Facebook Page with its posts, feeds, last sync and status.
8. The Feednetic Feed block in the block editor, with the feed picker in the sidebar.
9. The dashboard: your feeds, your accounts with follower growth, and the top posts this month.

== Changelog ==

= 1.0.0 =
* First public release.
* Instagram feeds (Business and Creator accounts, with Instagram Login) and Facebook Page feeds.
* Grid and carousel layouts, lightbox, feed header, Follow button and "Load more".
* Feed editor with live preview; Gutenberg block, shortcode and Elementor widget.
* Background sync every 30 minutes to 6 hours, with images stored on your site as resized WebP.
* Cache clearing for WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache and SiteGround Optimizer.

== Upgrade Notice ==

= 1.0.0 =
First public release of Feednetic.

== External services ==

Feednetic connects to the external services below. Nothing is sent to them on visitors' page views, except where noted for clicks on videos and links.

= Feednetic Connect (connection service) =

Used to connect an Instagram account or a Facebook Page, because Meta only gives API access to approved apps and this service holds Feednetic's app. Service URL: https://feednetic.io/oauth

* **When:** only when an administrator clicks **Connect** (and finishes the Meta login). It is not contacted during syncs, token renewals or page views.
* **What is sent when the connection starts:** your site URL, the return URL on your site (`/wp-admin/admin-post.php`), a one-time OAuth state value and a PKCE code challenge.
* **What is sent when the connection finishes:** your site sends the one-time connection code, the network name, your site URL and the PKCE code verifier to the service over HTTPS (certificate always verified). The service exchanges the code with Meta and returns, in the HTTPS response, the access token, its expiry date and the account's ID, name, username and profile picture URL; for Facebook, also the Pages you manage, each with its own Page token. The service does not store your token, posts or account details.
* Terms of use: https://feednetic.io/terms
* Privacy policy: https://feednetic.io/privacy

= Instagram API (Meta) =

Used to read the connected Instagram account. Hosts: `graph.instagram.com` and Instagram's image servers (`*.cdninstagram.com`, `*.fbcdn.net`).

* **What is fetched:** the account's profile (name, username, profile picture, bio, follower and post counts) and its posts (caption, media type, image/video URLs, permalink, date, like and comment counts).
* **When:** in the background right after connecting, then on the sync schedule chosen in Settings (30 minutes to 6 hours, 1 hour by default), when an administrator clicks **Sync now**, and once a day for the profile. Images are downloaded once and stored in your uploads folder.
* **Token:** the access token is stored in your WordPress database, encrypted with libsodium, and renewed directly with `graph.instagram.com` before it expires.
* Meta Platform Terms: https://developers.facebook.com/terms/
* Instagram Terms of Use: https://help.instagram.com/581066165581870
* Meta Privacy Policy: https://www.facebook.com/privacy/policy/

= Facebook Graph API (Meta) =

Used to read a connected Facebook Page. Hosts: `graph.facebook.com` and Facebook's image servers (`*.fbcdn.net`).

* **What is fetched:** the Page's name, picture, follower count and its posts (text, photos, video thumbnails, link, date and reaction/comment counts).
* **When:** right after connecting, then on the sync schedule chosen in Settings (30 minutes to 6 hours, 1 hour by default), when an administrator clicks **Sync now**, and once a day for the Page profile.
* **Token:** the Page access token is stored in your WordPress database, encrypted with libsodium.
* Meta Platform Terms: https://developers.facebook.com/terms/
* Meta Terms of Service: https://www.facebook.com/terms.php
* Meta Privacy Policy: https://www.facebook.com/privacy/policy/

= Visitors' browsers =

Your visitors' browsers load images from your own site only. Only when a visitor clicks a video, a "View on Instagram/Facebook" link or the Follow button does their browser open Instagram or Facebook, under Meta's terms and privacy policy above.

== Bundled libraries ==

All bundled code is GPL-compatible:

* Action Scheduler 4.2.0 by WooCommerce (PHP, `vendor/woocommerce/action-scheduler`) — GPL-3.0-or-later — https://actionscheduler.org
* @tanstack/react-query 5.107.1 (admin JS) — MIT — https://tanstack.com/query
* lucide-react 1.72.0 (admin icons) — ISC — https://lucide.dev
* Manrope 5.3.0 (@fontsource/manrope, admin font) — OFL-1.1 — https://fonts.google.com/specimen/Manrope
* Plus Jakarta Sans 5.3.0 (@fontsource/plus-jakarta-sans, admin font) — OFL-1.1 — https://fonts.google.com/specimen/Plus+Jakarta+Sans

React and the @wordpress/* packages are not bundled: the admin uses the copies that ship with WordPress.

The fonts are bundled with the plugin and used only on Feednetic's admin screens; nothing is loaded from Google.

Source code of the compiled JavaScript and CSS is included in `assets/src/`. Build with `npm install && npm run build`.
