=== gripspace Social Feed ===
Contributors: gripspace
Tags: social feed, photo feed, feed, gallery, slider
Requires at least: 5.8
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 your Instagram posts as a grid or slider. Connect in a few clicks, with no developer account needed. grip space is optional.

== Description ==

Display the posts from your Instagram business account on your WordPress site, as a grid or a horizontal slider. You choose the number of columns, the gap, how many posts to show, what happens on hover and on click, and whether to show the account header and a follow button.

The plugin works **on its own**. Press "Connect Instagram", sign in, and you are done. You do not need a Meta developer account and you do not need to create an app. Only your own profile and media are read (`instagram_business_basic`).

Signing in is handled by grip space, which holds the reviewed Meta app. Only the exchange step goes through grip space; your access token is then stored on this site, and your posts are read directly from Instagram from then on. **A grip space account is not required.**

If you already use **grip space**, you can additionally connect this site with a connection key and reuse the Instagram widgets you created there, together with grip's visitor measurement. That part is optional; the plugin is fully usable without it.

= Displaying a widget =

Create a widget under "Social Feed → Widgets", then place it with the shortcode:

`[grip_social_feed id="1"]`

= External services =

**Instagram (Meta Platforms, Inc.)**
Used to read your own profile and media so they can be displayed on your site. When a widget is rendered, this site sends your access token to `graph.instagram.com` and receives image URLs, permalinks, captions and like/comment counts. Your visitors' data is not sent. Requests are made from your server, not from the browser.
The sign-in itself goes to `www.instagram.com` and the token exchange is performed by grip space (see below).
Terms: https://www.instagram.com/legal/terms/ / Privacy policy: https://privacycenter.instagram.com/policy/

**grip space (ibis studio K.K.)**
Used for two things. First, to complete the Instagram sign-in: this site sends its own admin URL to `n246.grip.space` to start the flow, grip space exchanges the authorization code for an access token and hands it back to this site. grip space does not keep the token, and no account is needed for this.
Second, only if you choose to connect it: reusing Instagram widgets you created in grip space and measuring visits. When connected, this site sends the connection key, the site URL, and requests for widget lists and the measurement tag. If the measurement tag is enabled, visitor access data is collected by grip space.
Terms: https://grip.website/terms / Privacy policy: https://grip.website/privacypolicy

= Trademarks =

Instagram and Meta are trademarks of Meta Platforms, Inc. This plugin is not affiliated with, endorsed by, or sponsored by Meta Platforms, Inc. The names are used only to describe what the plugin connects to.

"grip space" is a product of ibis studio K.K., the author of this plugin.

== Installation ==

1. Install and activate the plugin.
2. Go to "Social Feed → Settings" and press "Connect Instagram".
3. Sign in with your Instagram professional account (Business or Creator) and approve.
4. You are returned to this screen. Create a widget under "Social Feed → Widgets" and place its shortcode on a page.

== Frequently Asked Questions ==

= Do I need a grip space account? =

No. Connecting Instagram works without one. grip space is optional and only adds reuse of widgets created there plus visitor measurement.

= Do I need a Meta developer account or an app? =

No. The reviewed Meta app belongs to grip space and is used only to complete the sign-in.

= Does my site need to be publicly reachable? =

Yes. Before starting the sign-in, grip space checks that the site you are returning to is really this site. A site that cannot be reached from the internet (for example a local environment) cannot be connected.

= What happens when the token expires? =

The long lived token is refreshed automatically by a daily scheduled task, starting 10 days before it expires.

= Does uninstalling delete my widgets? =

No. Uninstalling only clears temporary caches. Widget definitions and connection settings are kept so that reinstalling does not lose your data.

== Screenshots ==

1. Widget list.
2. Widget settings (layout, hover and click behaviour, account header).
3. grip space settings screen.

== Changelog ==

= 1.0.0 =
* First release.
* Grid and horizontal slider layouts, with control over the number of columns, the gap between images, how many posts to show, hover and click behaviour, the account header and a follow button.
* Lightbox with caption, likes and comments.
* One-click Instagram sign-in. No Meta developer account and no app setup are needed; only your own profile and media are read.
* Live preview at actual size in the widget editor, drawn with the same code as the front end.
* Multiple Instagram accounts, with several widgets per account.
* Long lived tokens are refreshed automatically by a daily scheduled task.
* Optional grip space connection: reuse widgets created in grip space and see how many times each one was shown.
* Uninstalling keeps your widgets and settings; only temporary caches are cleared.
