=== AVIR Auto Post to X Ultimate ===
Contributors: avirmedia
Author: Avir Media
Tags: autoposting to x, x auto post, social media automation, social media auto post, auto x post
Requires at least: 5.8
Tested up to: 6.8
Stable tag: 1.3.7
License: GPL v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Automatically post your WordPress content to X (formerly Twitter) with advanced customization options and media support.

== Description ==

AVIR Auto Post to X Ultimate is a powerful WordPress plugin that enables posting your content to X (formerly Twitter) with extensive customization options and a user-friendly interface.

= Core Features =

* Share posts to X directly from WordPress editor
* Auto-post option when publishing new content
* Include featured images with your posts
* Add and position hashtags strategically
* Preview posts before publishing
* Monitor post status in WordPress admin
* Test API connection functionality
* Real-time character counting
* Support for different X character limits:
  * Free accounts: 280 characters
  * Premium accounts: 25,000 characters

= Content Customization =

* Custom post text editor
* Adjustable excerpt length
* Custom "Read more" text
* Link prefix options
* Header stripping option
* Link position settings:
  * Same line as read more text
  * New line after read more text
* Hashtag positioning:
  * Top of post
  * Bottom of post

= Post Editor Integration =

* Dedicated meta box for X posting
* Real-time character count validation
* Featured image toggle
* Hashtag input field
* Post preview functionality
* Post status indicator
* Success/error notifications
* Post history posting time tracking

= Admin Features =

* Status column in posts list
* API credential management
* Connection testing tool
* Customizable settings:
  * Character limits
  * Excerpt length
  * Text area height
  * Link formatting
  * Status column display with re-posts count

= User Interface =

* Clean, intuitive design
* Mobile-responsive layout
* Post preview modal
* Visual status indicators
* Easy-to-use controls
* Helpful inline documentation

= Security Features =

* Secure API communication
* Protected credential storage
* WordPress nonce verification
* User capability checking
* Basic error logging

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/avir-autopost-to-x-ultimate`
2. Activate the plugin through the 'Plugins' menu
3. Go to Settings > AVIR Auto Post to X Ultimate
4. Enter your X API credentials
5. Configure posting preferences
6. Start posting to X!


== Frequently Asked Questions ==

= Do I need an X Developer Account? =

Yes, you need an X Developer Account to obtain the necessary API credentials.

= What are the character limits? =

* Free accounts: 280 characters
* X Blue subscribers: 25,000 characters
* Verified Organizations: 25,000 characters

= Why am I getting "OAuth1 app permissions" error when posting? =

If you see the error "Twitter/X API Error: Your client app is not configured with the appropriate oauth1 app permissions for this endpoint. (HTTP 403)", follow these steps:

1. **Update App Permissions**:
   * Log in to the [Twitter Developer Portal](https://developer.twitter.com/en/portal/dashboard)
   * Select your project and app
   * Go to "App settings" or "User authentication settings"
   * Under "App permissions", change from "Read" to "Read and Write"
   * Save your changes

2. **Regenerate Access Tokens**:
   * Go to the "Keys and tokens" tab
   * Revoke your existing access token and secret
   * Generate new access token and secret with the updated permissions
   * Update these new values in the plugin settings

3. **Verify API Access Level**:
   * As of 2023, Twitter/X requires a paid Basic tier or higher for posting
   * Ensure your developer account has an active subscription
   * Free API access is limited to read-only operations

4. **Test Connection**:
   * After updating credentials, use the "Test API Connection" button
   * A successful connection confirms your authentication is working
   * You should now be able to post to X

= Can I customize the post format? =

Yes, you can customize:
* Post text content
* Hashtag position (top/bottom)
* Link format and prefix
* Read more text
* Featured image inclusion

= Does it support scheduled posts? =

No, currently the plugin only supports manual posting and immediate auto-posting when publishing. Scheduled posts must be manually shared to X after they are published.

= Can I preview posts before sharing? =

Yes, there's a built-in preview feature showing exactly how your post will look on X.

= How do I know if a post was shared successfully? =

The plugin provides:
* Immediate success/error notifications
* Status indicators in the post editor
* Status column in the posts list

== Changelog ==

= 1.3.7 =
* Repository update

= 1.3.6 =
* Provisional code tweaks
* Fixed invalid post column display icon definition
* Fixed SAVE DRAFT issue that flagged post as posted
* Updated X.com post size definitions

= 1.3.5 =
* Added option to copy editor contents into clipboard
* Added option to save editor DRAFT without posting to X
* Added a post counter displaying how many times each post has been published
* Repost count is now visible on the post list and editor status panels

= 1.3.4 =
* WordPress 6.8.2 compliance update

= 1.3.3 =
* Various interface tweaks

= 1.3.2 =
* Various feature enhancements
* Optimizations for WP compliance
* Improved GUI
* Added FAQ information

= 1.3.1 =
* Added support for WordPress 6.8
* Enhanced error handling
* Improved API connection stability
* Updated X API integration
* Fixed minor UI issues

= 1.3.0 =
* Initial release with core features
* X API integration
* Custom post formatting
* Media support
* Preview functionality

== Upgrade Notice ==

= 1.3.1 =
This version includes important stability improvements and WordPress 6.8 compatibility updates. Please upgrade to ensure continued functionality.

== Additional Information ==

= API Requirements =

* X (Twitter) Developer Account
* API Key
* API Key Secret
* Access Token
* Access Token Secret

= Post Editor Features =

* Character count display with:
  * Normal state (0-90% used)
  * Warning state (90-100% used)
  * Error state (over limit)
  * Success state (within limit)
* Post status indicators:
  * Not posted
  * Posted successfully
  * Post date/time

= Content Formatting =

* Excerpt generation options:
  * Character-based length control
  * Header tag stripping
  * Automatic ellipsis
  * Smart word boundary trimming
* Link formatting options:
  * Custom prefix symbols
  * Position control
  * Read more text customization

= Media Handling =

* Featured image support:
  * Toggle inclusion
  * Preview in post modal
  * Automatic upload to X
  * Error handling for failed uploads

= Error Handling =

* API connection errors
* Authentication failures
* Media upload issues
* Character limit violations
* Network connectivity problems
* User permission issues

= Interface Elements =

Meta Box Features:

* Post text editor
* Hashtag input
* Position selector
* Image toggle
* Preview button
* Post button
* Status display
* Character counter

Settings Page Features:

* API credential fields
* Content configuration
* Display options
* Test connection tool
* Save settings button

= Compatibility =

WordPress Requirements:

* WordPress 5.8 or higher
* PHP 7.0 or higher
* MySQL 5.6 or higher
* Active REST API

Browser Support:

* Chrome (latest)
* Firefox (latest)
* Safari (latest)
* Edge (latest)

= Performance Considerations =

The plugin:

* Uses WordPress native functions
* Minimizes database queries
* Optimizes API calls
* Caches responses
* Handles timeouts gracefully

= Known Limitations =

* No scheduling support
* Single account only
* Basic media handling
* No analytics integration
* Manual post management only

= Support Resources =

* Plugin documentation
* WordPress.org support forum
* Error documentation
* API troubleshooting guide
* Installation guide

== External Services ==

This plugin connects to X (formerly Twitter) API services to post content from your WordPress site to your X account.

= Data Transmission =

* When posting: The plugin sends post content, hashtags, and optionally featured images to X's API
* When testing connection: The plugin verifies API credentials by retrieving basic account information
* When uploading media: The plugin sends featured images to X's media upload API

= Service Provider =
These services are provided by X Corp. (formerly Twitter):

* Terms of Service: https://twitter.com/tos
* Privacy Policy: https://twitter.com/privacy
* Developer Agreement: https://developer.twitter.com/en/developer-terms/agreement


== Privacy Considerations ==

The plugin:

* Connects to X's API services
* Stores API credentials in your WordPress database
* Tracks post status
* Logs basic errors
* Respects WordPress permissions

= Best Practices =

For optimal use:

* Configure API credentials correctly
* Test connection before use
* Preview posts before sharing
* Monitor character count
* Check post status
* Keep credentials secure

= Uninstall Cleanup =

Removes:

* Plugin options
* API credentials
* Post meta data
* Status records
* Cache data

== Privacy Policy ==

This plugin:

1. Connects to X's API services
2. Stores necessary API credentials in user's WordPress Database
3. Creates post meta data
4. Tracks posting status and stores data in user's WordPress Database
5. Logs basic error information for debug purposes only

Please review X's privacy policy regarding API usage and data handling.

== Support ==

For support:

* Check documentation
* Visit WordPress.org forum
* Review error logs
* Test API connection
* Verify credentials

== Credits ==

* Developed by Avir Media
* X API Integration
* WordPress Core Integration
* UI/UX Design
* Error Handling

== License ==

GPLv2 or later

* You can use this plugin
* You can modify this plugin
* You can distribute this plugin
* You must maintain GPL license
