=== SocialEyes ===
Contributors: thesaasfactory
Tags: social media, facebook, instagram, feed, aggregator
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Display social media feeds from Facebook, Instagram, and other platforms in beautiful, customizable skins.

== Description ==

**SocialEyes** is a modular social feed aggregator that displays posts from Facebook, Instagram, Twitter, and other platforms in beautiful skin styles on your WordPress site.

**Current version includes:**

— **Facebook integration** — display posts from any Facebook Page you manage
— **Masonry skin** — Pinterest-style grid, 3 columns on desktop, 2 on tablet, 1 on mobile
— **Light and dark themes** — automatic system preference detection or force a specific theme
— **Click to expand** — full post modal with images and complete text
— **Customizable via CSS variables** — full control over colors and styling

SocialEyes is built with a modular architecture. Future updates will add Instagram, Twitter, TikTok, RSS feeds, and additional skins (a carousel is next) and more.

== How it works ==

1. Connect your Facebook Page (requires Page ID and Access Token)
2. Add the `[socialeyes]` shortcode to any page or post
3. Posts are fetched from Facebook's Graph API and cached for performance
4. Visitors see a beautiful masonry grid of your latest posts
5. Click any post to view full content in a modal

Posts are cached for 30 minutes by default (configurable in settings). SocialEyes fetches fresh posts automatically when the cache expires.

== Key features ==

**Modular architecture**
— sources and skins are discovered automatically. Drop new modules into folders and they appear in the admin panel. No code changes needed.

**Facebook source**
— fetch posts from any Facebook Page you manage. Control image handling (prefer images, all posts, or images only) and number of posts to fetch.

**Masonry skin (after Pin Interest model)**
— 3 columns of posts visible on desktop, 1 on mobile. Click to expand, swipe gestures, keyboard navigation. Infinite loop for seamless browsing.

**Theme system**
— light and dark themes with CSS variables. Force a theme via shortcode or let users' system preferences decide. Full customization available via CSS.

**Performance optimized**
— feeds are cached in WordPress transients. Configurable cache duration (5 minutes to 24 hours). AJAX loading prevents page blocking.

**Clean admin panel**
— tabbed interface organized by Settings, Themes, and Sources. Clear separation of functionality makes configuration intuitive.

== Roadmap ==

**v1.0.4** — Standalone JavaScript widget (use outside WordPress)
**v1.1** — Instagram Business integration
**v1.2** — Twitter/X integration  
**v1.3** — Grid skin
**v1.4** — Multi-source feed mixing


== Installation ==

1. Upload the `socialeyes` folder to `/wp-content/plugins/`
2. Activate the plugin through the **Plugins** menu in WordPress
3. Go to **SocialEyes** in the admin menu
4. Navigate to **Sources** tab and enter your Facebook Page ID and Access Token
5. Add the shortcode to any page or post:

`[socialeyes source="facebook" skin="masonry"]`

To force a theme, add `theme="light"` or `theme="dark"`:

`[socialeyes source="facebook" skin="masonry" theme="dark"]`

== Getting your Facebook credentials ==

**Page ID:**
1. Go to your Facebook Page
2. Click **About** in the left sidebar
3. Scroll down to find your Page ID

**Access Token:**
1. Go to [Facebook Developers](https://developers.facebook.com/)
2. Create an app or use an existing one
3. Add the **Pages** product
4. Generate a Page Access Token with `pages_read_engagement` permission
5. For long-lived tokens, exchange your short-lived token using the Token Debugger

== Frequently Asked Questions ==

= Do I need a Facebook account? =

Yes. SocialEyes fetches posts from Facebook Pages via the Graph API. You need to manage the Page you want to display and have API credentials.

= Is SocialEyes free? =

Yes. This version of SocialEyes is completely free and open source under GPL v2. No external services, no subscriptions, no hidden costs.
We are developing a significantly enhanced version of this product - "SocialEyes Blender" - which will combine feeds from multiple sources and offer more skin choices etc. This will be a commercial product.
This basic free version will always remain.

= What social networks are supported? =

Version 1.0 supports Facebook Page posts. 
Instagram, Twitter, TikTok, and RSS feeds are coming in future updates.

= Can I customize the appearance? =

Yes. SocialEyes uses CSS variables for theming. You can override colors in **Appearance → Customize → Additional CSS**:

`:root {
  --socialeyes-primary: #your-color;
  --socialeyes-accent: linear-gradient(135deg, #color1, #color2);
}`

Full variable reference available in the documentation.

= Does it work with page builders? =

Yes. The `[socialeyes]` shortcode works anywhere WordPress shortcodes are supported, including Elementor, Divi, Gutenberg (Shortcode block), and all major page builders.

= How often are posts updated? =

SocialEyes caches posts for 30 minutes by default (configurable in **Settings**). This reduces API calls and improves performance. Cache is automatically refreshed when expired.

= Can I display multiple sources together? =

Not yet. Version 1.0 displays one source at a time. Multi-source feed mixing is coming in "Blender".

= Will it slow down my site? =

No. Posts are cached and loaded via AJAX after the page loads. The plugin uses vanilla JavaScript with no dependencies (no jQuery), keeping the footprint small.

== External Services ==

**This plugin connects to the Facebook Graph API to fetch posts from Facebook Pages.**

**What is sent:**
- Your Facebook Page ID
- Your Facebook Access Token
- Request parameters (number of posts, fields to retrieve)

**When data is sent:**
- When the plugin fetches posts from Facebook (every 30 minutes by default, or when cache expires)
- Data is sent from your WordPress server to Facebook's servers
- No visitor data is sent to Facebook - only your server-side credentials

**Service information:**
- Service: Facebook Graph API (provided by Meta Platforms, Inc.)
- Privacy Policy: https://www.facebook.com/privacy/policy/
- Terms of Service: https://www.facebook.com/terms.php
- Developer Terms: https://developers.facebook.com/terms

The plugin does not send any visitor information to Facebook. It only fetches publicly available posts from Pages you manage using your own API credentials. All communication happens server-side between your WordPress installation and Facebook's API.

== Changelog ==

= 1.0.3 =
* Added: Masonry skin — Pinterest-style grid layout
* Added: SocialEyes Blender promo in admin Skins tab
* Improved: Modal close button z-index and image max-height
* Improved: Removed unimplemented notifications UI (coming in Blender)
* Fixed: Complete rename from FeedWorks to SocialEyes (at the request of wordpress.org)

= 1.0.2 =
* Fixed: Added wp_unslash() to $_GET variables as recommended by plugin-check
* Improved: Code quality and WordPress coding standards compliance

= 1.0.1 =
* Fixed: Proper wp_enqueue usage for scripts
* Fixed: Facebook Graph API disclosure in External Services section
* Fixed: Nonce sanitization with wp_unslash and sanitize_text_field
* Improved: Compliance with WordPress.org plugin guidelines

= 1.0.0 =
* Initial public release
* Facebook Page integration via Graph API
* Masonry skin - Pinterest-style grid, 3 columns on desktop
* Light and dark theme support with CSS variables
* Auto-advance on hover, click to expand modal
* Configurable cache duration and post count
* Modular architecture for future expansion

== Upgrade Notice ==

= 1.0.2 =
Minor code quality improvements. Recommended update.

= 1.0.1 =
WordPress.org compliance fixes. Recommended update for all users.

= 1.0.0 =
Initial release. Display Facebook Page posts in a beautiful template.
