=== Tilfy ===
Contributors: kupeliahmetcelal
Tags: social media, instagram, facebook, youtube, scheduling, cross-posting, tiktok, linkedin, threads
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.22.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Manage social content, cross-post to multiple platforms, and schedule publishing from WordPress.

== Description ==

**You need your own API keys.** Tilfy does not ship with shared platform credentials. Before you can sync, publish, or automate, you must create developer apps on Meta (Facebook / Instagram / Threads), Google (YouTube), LinkedIn, and/or TikTok, then enter your Client ID, Client Secret, and tokens in **Tilfy → Settings**. Tilfy only talks to social networks through **your** accounts and **your** approved apps.

= What is Tilfy? =

[Tilfy](https://iprct.net) is a WordPress admin plugin for teams and publishers who work across several social platforms. It pulls content metadata (and media when needed) into a central library inside WordPress, lets you prepare posts in a studio workflow, queue uploads to destination platforms, schedule them on a calendar, and track what succeeded or failed.

Tilfy is built by [Ahmet Celal Kupeli](https://iprct.net). The project grew from real newsroom and creator workflows: one source video or post should be able to reach Instagram, Facebook, YouTube, LinkedIn, TikTok, and Threads without re-uploading everything manually in six different apps.

Supported platforms:

* Instagram (Reels / feed via Meta API)
* Facebook (Reels / feed via Meta API)
* Threads (feed via Meta API)
* YouTube (video / Shorts /Via YouTube Data API )
* LinkedIn (Posts / Via Linkedin API )
* TikTok (Direct Post when your app is approved)
* WordPress (as a content source)

Core capabilities:

* **Content library** — sync posts from connected source platforms into one list with filters, search, and grid/list views.
* **Studio** — compose or adapt a post (title, description, tags, cover, media) and send it to one or more target platforms.
* **Queue and scheduling** — background jobs download remote media when required, upload to APIs, and respect scheduled times.
* **Cross-posting automation** — rules such as “new YouTube video → Instagram after X hours” with daily limits and spacing.
* **Public gallery shortcodes** — show synced content on the front end (`[tilfy-instagram]`, `[tilfy-youtube]`, `[tilfy-all]`, and more).
* **Processes panel** — see queue status, cron health, and stuck jobs (operational messages).
* **Languages** — Turkish source strings in the UI. Community translations are handled through translate.wordpress.org after the plugin is listed.

= Admin pages (what each screen is for) =

**Panel** (`Tilfy → Panel`)

Your home dashboard. Shows counts for total content, pending shares, manual items, completed uploads, and errors. Lists which platforms are connected and offers quick links into sync and the rest of the plugin.

**Studio** (`Tilfy → Studio`)

Where you create or edit a share before it goes live. Pick a WordPress post or library item, set title, description, tags, cover image, target platforms, and scheduling. Use this for one-off cross-posts and manual publishing.

**Content** (`Tilfy → Content`)

The main library of everything Tilfy has synced from your sources. Filter by platform, date, media type, sync state, and search by title. Hide items you do not want in the list (metadata stays in the database). Open items for preview, cart/bulk actions, and sending to Studio or the share queue.

**Calendar** (`Tilfy → Calendar`)

Month/week view of scheduled and pending shares. Useful to see what will publish when, move or review timing, and avoid collisions across platforms.

**Shares** (`Tilfy → Shares`)

Full history and live status of every share record: waiting, uploading, scheduled, published, manual hold, or error. Filter by platform and status, inspect API error messages, open the live post on the target network when available, and delete or retry where supported.

**Automation** (`Tilfy → Automation`)

Cross-posting rules without opening Studio each time. Example: source YouTube → target Instagram, with delay, daily cap, spacing between posts, and minimum source date. Run a rule manually with “Check now” or let the background scheduler pick up new eligible content. Preview shows why items were skipped (already shared, hidden, wrong type, and so on).

**Processes** (`Tilfy → Processes`)

Technical control center for the job queue: media downloads, API uploads, sync jobs, and automation ticks. Pause the queue, cancel stuck jobs, read cron diagnostics, and see English status labels for operators. Use this when uploads seem stuck or WP-Cron is slow on your host.

**Downloaded files** (`Tilfy → Downloaded files`)

Lists video and image files Tilfy copied to your server (`wp-content/uploads/tilfy-medya` by default). See which content each file belongs to, share status, and delete files that are safe to remove. Protected files stay locked while a download or upload is still running.

**Settings** (`Tilfy → Settings`)

* **Connection hub** — overview of platform health and links to each API tab.
* **Meta / YouTube / LinkedIn / TikTok** — enter app credentials, connect accounts, and run OAuth where supported. Step-by-step hints are on each tab.
* **Site gallery** — enable front-end shortcodes, choose platforms, modal behavior, filters, and button text.
* **General** — language, default tags, media folder, queue mode, sync options, duplicate protection, activity log, hidden content list, and copyright notice.
* **Cleanup** — maintenance tools for old queue data and disk usage (use with care).

= Shortcodes (front end) =

When gallery is enabled in Settings, place shortcodes in pages or posts:

* `[tilfy-instagram]` — Instagram-sourced items
* `[tilfy-facebook]` — Facebook-sourced items
* `[tilfy-youtube]` — YouTube-sourced items
* `[tilfy-linkedin]` — LinkedIn-sourced items
* `[tilfy-tiktok]` — TikTok-sourced items
* `[tilfy-threads]` — Threads-sourced items
* `[tilfy-wordpress]` — WordPress-sourced items
* `[tilfy-all]` — all enabled sources

Optional attributes: `limit`, `sira` (`yeni` or `eski`), `medya` (`gorsel` or `video`).

= Privacy and data =

Tilfy stores content metadata, share records, and queue jobs in your WordPress database. Media files are saved on your server when a platform requires a local file for upload. API credentials are saved in WordPress options on your site. Tilfy does not route your content through a third-party Tilfy cloud; API calls go from your server to the social networks you configure.

= Author and website =

Developed by Ahmet Celal Kupeli · [https://iprct.net]


== External services ==

Tilfy connects from your WordPress server to third-party social platforms using API credentials that you provide. Tilfy does not send your data through a Tilfy cloud service. Calls go directly to the networks you enable.

= Meta (Facebook, Instagram, Threads) =

Used for OAuth login, syncing content metadata, downloading media when needed for republishing, and publishing posts, Reels, Stories, or feed items to Facebook, Instagram, and Threads.

Data sent: access tokens, page or account IDs, post text, media URLs or uploaded media files, and scheduling related fields when you sync or publish.

When: when an admin connects an account, runs sync, publishes or schedules a share, or automation processes a rule.

Media CDN: when cover images or media files must be copied to your server for republishing, Tilfy may download them from Meta CDN hosts such as cdninstagram.com and fbcdn.net. This is media fetching for the Meta integration, not remote loading of plugin scripts or styles.

Service links: [Meta Terms](https://www.facebook.com/terms.php), [Meta Privacy Policy](https://www.facebook.com/privacy/policy/), [Meta Platform Terms](https://developers.facebook.com/terms/).

= Google (YouTube) =

Used for OAuth login, syncing YouTube video metadata, and uploading videos or Shorts to YouTube.

Data sent: OAuth tokens, channel related identifiers, video title, description, tags, privacy status, and video file data when uploading.

When: when an admin connects YouTube, runs sync, or publishes or schedules a YouTube share.

Media CDN: when thumbnails or related media must be copied to your server, Tilfy may download them from Google or YouTube CDN hosts such as googleusercontent.com, ytimg.com, and ggpht.com. This is media fetching for the YouTube integration, not remote loading of plugin scripts or styles.

Service links: [Google Terms of Service](https://policies.google.com/terms), [Google Privacy Policy](https://policies.google.com/privacy), [YouTube Terms of Service](https://www.youtube.com/t/terms), [YouTube API Services Terms](https://developers.google.com/youtube/terms/api-services-terms-of-service).

= LinkedIn =

Used for OAuth login, reading basic profile information needed for posting, and publishing posts (including media when required).

Data sent: access tokens, author URN or person identifiers, post text, and media upload payloads when publishing.

When: when an admin connects LinkedIn or publishes or schedules a LinkedIn share.

Service links: [LinkedIn User Agreement](https://www.linkedin.com/legal/user-agreement), [LinkedIn Privacy Policy](https://www.linkedin.com/legal/privacy-policy), [LinkedIn API Terms of Use](https://www.linkedin.com/legal/api-terms-of-use).

= TikTok =

Used for OAuth token exchange and Direct Post publishing when your TikTok developer app is approved.

Data sent: client credentials, OAuth tokens, post caption or metadata, and media when publishing.

When: when an admin connects TikTok or publishes or schedules a TikTok share.

Service links: [TikTok Terms of Service](https://www.tiktok.com/legal/page/us/terms-of-service/en), [TikTok Privacy Policy](https://www.tiktok.com/legal/page/us/privacy-policy/en), [TikTok Developer Terms](https://www.tiktok.com/legal/page/global/tiktok-developer-terms-of-service/en).

== Installation ==

1. Upload the `tilfy` folder to `/wp-content/plugins/`.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Open **Tilfy → Settings** and add your platform API credentials (required before sync or publishing).
4. Connect each network you plan to use (OAuth buttons on the relevant settings tabs).
5. Run an initial sync from **Tilfy → Panel** or per-platform controls in **Content**.
6. Create shares from **Studio**, or set up rules under **Automation**.

For gallery on the public site: enable **Site gallery** under Settings, then add a shortcode to a page.

== Changelog ==

= 1.22.0 =
* İçerikler detail: live Instagram API test (does not save) to see whether Meta returns media_url or only thumbnail_url.
* Live API test loads the Meta module correctly (no false “API yok” when Meta ID is present).
* Paylaşımlar: Detay replaces Log; one modal shows media fields plus the işlem logu; action icons stack bottom-right to top-right on hover.
* İçerikler detail: when Instagram has no media_url, manual Facebook / Threads search by title so you can pick a matching video from your own Page/Threads and bind it, then share again.

= 1.21.9 =
* İçerikler: action icons stack bottom-right to top-right and show on hover so they do not cover titles.
* İçerikler: detail modal for Meta ID, social source, remote media/cover URLs, local file names and uploads-relative paths, and target share URLs.

= 1.21.8 =
* Instagram Reels/videos no longer fall back to the cover JPEG as the download file when Meta omits media_url (for example copyrighted / library audio).
* YouTube refuses image files with a clear error instead of looping on image/jpeg.
* Job details show the real remote media URL when a wrong local image was saved.

= 1.21.7 =
* Fixed a media save crash that could leave retries stuck near 96% and block uploads after Instagram media refresh.

= 1.21.6 =
* Safer Connect buttons and login return checks for social accounts.
* Safer background cover refresh requests.
* Cleaner handling of forms and share settings data.
* Stronger database safety for lists and filters.
* Long jobs (sync, queue, covers, cross-post) use limited time and memory only while they run — not for the whole site.
* Contributor name updated for WordPress.org.
* Fixed TikTok upload for larger videos (chunk count).

