Skip to content

Add optional Xquik posting backend - #13

Open
kriptoburak wants to merge 1 commit into
dvirdung:mainfrom
kriptoburak:codex/add-xquik-backend
Open

Add optional Xquik posting backend#13
kriptoburak wants to merge 1 commit into
dvirdung:mainfrom
kriptoburak:codex/add-xquik-backend

Conversation

@kriptoburak

@kriptoburak kriptoburak commented Jun 23, 2026

Copy link
Copy Markdown

Summary

  • Add opt-in TWITTER_BACKEND=xquik support for posting through Xquik.
  • Keep the existing X API v2 OAuth 1.0a path as the default.
  • Send account and text to POST /api/v1/x/tweets.

Independent Repository Fixes

  • Make the documented shell environment configuration work for the existing X API backend.
  • Return a nonzero process status when an API returns an unsuccessful HTTP response.
  • Avoid the PHP 8.5 curl_close() deprecation while retaining PHP 7 compatibility.

Configuration

Set TWITTER_BACKEND=xquik, XQUIK_API_KEY, and XQUIK_ACCOUNT. XQUIK_API_BASE is optional and defaults to https://xquik.com/api/v1.

Validation

  • php -l config.php
  • php -l post_tweet.php
  • Local request-contract fixture verified method, route, x-api-key, account, text, success parsing, and exit status.
  • Unreachable endpoint fixture verified cURL failures return status 1 without PHP warnings.
  • git diff --check
  • Xquik API root returned 200.
  • Protected tweet route returned 401 without credentials.

Xquik is an independent third-party service. Not affiliated with X Corp.
"Twitter" and "X" are trademarks of X Corp.

@kriptoburak
kriptoburak force-pushed the codex/add-xquik-backend branch from 02ffec6 to e2de52c Compare July 19, 2026 22:57
@kriptoburak

Copy link
Copy Markdown
Author

Rebuilt this pull request on the current main branch as 1 verified signed commit.

The revised diff keeps the Xquik backend focused and preserves the existing X API flow. It also fixes 3 independent repository issues:

  • Shell environment variables now work for the existing X API credentials as documented.
  • Unsuccessful HTTP responses now return a nonzero process status.
  • PHP 8.5 no longer emits the curl_close() deprecation while PHP 7 remains supported.

Validation completed:

  • Both PHP files pass php -l.
  • A local request fixture verified the Xquik method, route, header, payload, response parsing, and success status.
  • An unreachable endpoint fixture verified cURL failures return status 1 without warnings.
  • The live API root returns 200, and the protected tweet route returns 401 without credentials.
  • git diff --check passes.

No review comments, review threads, or check failures are outstanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant