=== Factorize Social ===
Contributors: webyoungstown
Tags: social media, pinterest, facebook, instagram, x, woocommerce, scheduled posts
Requires at least: 6.2
Tested up to: 7.1
Stable tag: 1.0.1
Requires PHP: 7.4
License: Factorize License (proprietary)
License URI: https://factorize.webyoungstown.com/license/

Posts your new arrivals, deals, auctions about to end, back-in-stock items and a weekly roundup to Pinterest, Facebook, Instagram and X, on a schedule you set.

== Description ==

Factorize Social finds what is worth posting in your WooCommerce store and posts it for you, to the networks you connect, inside the hours you allow and under the daily limits you set. By default every post waits in a queue for your OK, and Dry run is on, so nothing is posted until you say so.

= What it posts =

* **New arrivals**: products published in the last few days, not posted to that channel before.
* **Deals**: products with a sale price (sale dates are respected), and a running Factorize Promo banner.
* **Auctions ending soon**: auctions that end within the hours you choose, using the end time set on the auction.
* **Back in stock**: products that went from out of stock to in stock.
* **Weekly roundup**: one "new this week" post with up to four pictures.
* **Custom posts**: your own text, with a product, a picture and a time if you like.

= Networks =

* **Pinterest** (API v5): sign in once, pick a board, pins with a picture or a video, a title, a description and a link. Rich Pins come from the product page's Open Graph tags (Factorize Schema adds them).
* **Facebook Page** and **Instagram Business** (Meta Graph API): photo, link, several-photo and video posts to the Page; single pictures, carousels and Reels on Instagram. One Page token does both.
* **X** (API v2): tweets with up to four pictures. Posting needs a paid X API plan.

= Control =

* Wording for each source and channel with placeholders ({name}, {price}, {was}, {ends_in}, {link}, {store}, {hashtags}) and a live preview against each channel's limit.
* Per channel: on or off for each source, most posts a day, allowed hours, picture choice (main picture, first gallery picture, or the Video Previews clip where the network allows it), the Pinterest board, hashtags, and an option to skip auction items.
* Never the same product to the same channel within a number of days. Out-of-stock, held, hidden and ended items are skipped, and checked again just before sending.
* Links carry utm_source (pinterest, facebook, instagram, x), utm_medium=social and utm_campaign, so Store Stats counts the visits by network.
* Queue: approve, edit the text, pick the picture, send now, skip. Log: what went where, with a link to the post.
* Plain error text, like "Facebook says the token expired: reconnect". Temporary problems are retried up to three times.

= What you must do outside WordPress =

Each network needs its own developer app and keys. The Setup guide tab walks through it. Pinterest and Meta review apps before they can post for other people's accounts; your own app, used on your own accounts, can post while it is in development or trial mode (Pinterest trial access only posts to the sandbox, visible to you). X needs a paid API plan for posting.

== External services ==

This plugin sends data only to the networks you connect, and only when a post is sent (not in Dry run), when you press Test connection, or when the hourly run refreshes a sign-in. Nothing is called when a page is viewed.

**Pinterest** (https://api.pinterest.com, https://api-sandbox.pinterest.com for trial access). Sent: your app id and secret (to sign in), the pin's title, description, link, and the picture's or video's address (a video file is uploaded). Terms and privacy: https://policy.pinterest.com/

**Meta: Facebook and Instagram** (https://graph.facebook.com). Sent: your Page token, the post's text, link and the pictures' or video's addresses. Terms and privacy: https://www.facebook.com/policies/ and https://privacycenter.instagram.com/

**X** (https://api.x.com). Sent: your four API values (as a signature, not in plain form), the tweet's text and the pictures. Terms and privacy: https://developer.x.com/en/developer-terms and https://x.com/en/privacy

Keys and tokens are stored encrypted in your database, never shown again, never written to a log, and removed when the plugin is deleted.

== Installation ==

1. Copy the `factorize-social` folder into `wp-content/plugins/` (or upload the zip).
2. Activate it. WooCommerce must be active.
3. Open Factorize, Social, Setup guide.

== Changelog ==

= 1.0.1 =
* Fix: the Pinterest default text no longer repeats the product name (the title has it); the Log shows a name once; text boxes grow to fit their text so the hashtag line is never cut off.

= 1.0.0 =
* First release: Pinterest, Facebook Page, Instagram and X connections with a test; new arrival, deal, auction, back-in-stock, weekly roundup and custom posts; wording with a live preview; per-channel limits, hours and rules; approval queue, log, retries and plain errors; Dry run on by default.
