=== Qheem Social Manager ===
Tags: social media, scheduling, automation, content
Requires at least: 5.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 4.3.3
License: GPLv2
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Create source-based social drafts, preview images, schedule posts, and publish through configured social accounts.

== Description ==

Qheem Social Manager provides a WordPress administration dashboard for collecting website content and managing social posts.

Features:

* Create drafts from actual website content, with optional AI assistance.
* Preview saved post content in a 9:16 display and browse source images.
* Schedule selected posts using the WordPress site timezone.
* Generate drafts automatically at the configured frequency.
* Review pending posts and individual platform publishing results.
* Retry partial failures while skipping platforms already recorded as successful.
* Manage social credentials through the Settings screen.

The existing publishing integrations support Instagram feed images, Facebook image or text posts, and LinkedIn text posts. TikTok and Snapchat publishing are not implemented. Their credential settings are retained, but the dashboard identifies these platforms as unsupported.

The preview does not create videos, generate images, or resize the original image. Scraping requires PHP DOM and mbstring and reads server-rendered HTML. Websites requiring JavaScript or blocking automated access may not provide usable content.

== Installation ==

1. Upload the plugin ZIP through Plugins > Add New > Upload Plugin, or copy the qheem-social-manager directory to wp-content/plugins.
2. Activate Qheem Social Manager.
3. Open Qheem Social Manager > Settings and configure your source website.
4. Optionally configure the AI service key and supported social account credentials.
5. Scrape your website, generate a draft, select the draft, and schedule or publish it.

Back up an existing installation before replacing the plugin. Deactivate the old AI Social Manager copy before activating Qheem Social Manager; the renamed folder creates a separate plugin entry. Do not activate both copies together. Existing settings and queues are retained. If automation and auto-approval were already enabled, new posts can be scheduled automatically after updating.

== Frequently Asked Questions ==

= Is an AI service required? =

No. Without a working AI service, the plugin creates a draft from source text and reports that AI was not used. User writing instructions require the configured AI service. Images come from the source website.

= Which accounts can publish? =

The plugin includes Instagram, Facebook, and LinkedIn publishing integrations. Valid tokens, account identifiers, and provider publishing permissions are required. Saved credentials alone do not establish that publishing access works. TikTok and Snapchat publishing are unsupported.

= Why did a scheduled post run late? =

Scheduling uses WordPress cron. Low-traffic sites may run jobs late unless a server scheduler triggers WordPress cron. Stopping automation pauses automatic generation; existing explicitly scheduled posts remain active.

= What happens when publishing fails? =

Failed and partially published posts remain pending for review. A retry skips platforms already recorded as successful. If a request times out after a provider accepts a post, check the provider before retrying because the outcome can be uncertain.

= Does publishing also publish the WordPress draft? =

Yes. After social publishing succeeds, the linked WordPress draft is published. With no configured accounts, the plugin reports an error and leaves the draft pending.

== External Services ==

This plugin sends data to the services described below when their related features are used. Service accounts, access permissions, and separate service terms may apply.

= Source website and images =

The configured source website receives HTTP requests during manual scraping and enabled automatic scraping. Image hosts receive requests when images are checked or displayed. These requests expose normal connection information, including the requesting IP address. Only configure sources you are permitted to use.

= Qheem Station AI service =

Service: https://api.qheemstation.com
Provider website: https://qheemstation.com

When an AI key is configured and a post is generated, the plugin sends the key as a bearer credential and sends a prompt containing source content, source links, writing style, and user instructions to /generate. The expected response contains generated text. This is the plugin's original custom service, not a direct OpenAI integration.

The provider's service-specific terms and privacy-policy URLs have not been verified in this release. Obtain those policies from Qheem Station before sending content or enabling the service.

= Meta: Facebook and Instagram =

Service: https://graph.facebook.com
Account authorization: https://www.facebook.com

Connecting or testing an account exchanges authorization codes, credentials, and account identifiers with Meta and retrieves account information and permissions. Publishing sends post text, hashtags, source links, image URLs when applicable, account identifiers, and access tokens. These requests run during account setup, connection tests, manual publishing, or scheduled publishing.

Provider terms: https://www.facebook.com/terms.php
Provider privacy policy: https://www.facebook.com/privacy/policy/

= LinkedIn =

Service: https://api.linkedin.com

Manual or scheduled LinkedIn publishing sends the saved access token, person URN, and post text. The retained integration publishes text only.

Provider terms: https://www.linkedin.com/legal/user-agreement
Provider privacy policy: https://www.linkedin.com/legal/privacy-policy

= Snapchat account connection =

Services: https://accounts.snapchat.com and https://kit.snapchat.com

The retained optional account connection flow exchanges authorization codes and app credentials for account tokens and requests account information. It runs when the administrator connects the account. Snapchat publishing is not implemented and does not report a successful publication.

Provider terms: https://www.snap.com/terms
Provider privacy policy: https://values.snap.com/privacy/privacy-policy

== Changelog ==

= 4.3.3 =

* Adopted Qheem Social Manager branding and the qheem-social-manager slug/text domain.
* Loaded existing settings and sidebar CSS/JavaScript through WordPress enqueue APIs.
* Passed dashboard data through the WordPress script API.
* Preserved the original dashboard design, functionality, integrations and stored data keys.

= 4.3.1 =

* Rebuilt the dashboard with creation, preview, scheduling, pending posts, and account sections.
* Added real scheduling and an automatic generation worker.
* Corrected publishing success tracking and partial-failure retries.
* Removed invented source content and unrelated fallback images.
* Added administrator checks and OAuth callback validation.
* Removed the duplicate Plugin URI header and added this directory readme.
* Removed the external updater and license prompts from the WordPress.org build.
* Corrected escaped output, validated input, variable prefixes, and settings JavaScript.

== Upgrade Notice ==

= 4.3.1 =
Review retained automation and auto-approval settings before activating. Scheduled publishing is now implemented. Test your configured accounts before enabling unattended publishing.

== Screenshots ==

1. Main dashboard with AI post creation, live preview, scheduling, pending posts, and connected accounts.
2. Social media account management for supported platforms.
3. Analytics and reports for published and scheduled content.