Install
openclaw skills install composio-composer-xskillEnables posting tweets to Twitter/X through Composio's integration platform via HTTP and BeautifulSoup. Use when posting tweets or integrating with Composio.
openclaw skills install composio-composer-xskillThis skill enables posting tweets to Twitter/X through Composio's integration platform. It uses HTTP requests with BeautifulSoup to interact with Composio's web interface, providing a post_tweet function that can be called from OpenClaw.
Install dependencies:
pip install requests beautifulsoup4 python-dotenv
Configure credentials in .env file or environment
Import and use the skill in your OpenClaw workflow
Posts a tweet to Twitter/X using Composio.
Function Signature:
def post_tweet(content: str, composio_auth_token: str) -> dict:
Parameters:
content (str): The tweet content (max 280 characters)composio_auth_token (str): The Composio authentication token for authorizationReturns:
dict: Contains:
success (bool): Whether the tweet was posted successfullytweet_id (str): The posted tweet's ID (on success)tweet_url (str): URL to view the tweet (on success)error (str): Error message (on failure)Example:
result = post_tweet(
content="Hello from OpenClaw! 🐾",
composio_auth_token="your_composio_auth_token_here"
)
print(f"Tweet posted: {result.get('tweet_url')}")
Retrieves a tweet by ID.
Function Signature:
def get_tweet(tweet_id: str, composio_auth_token: str) -> dict:
Parameters:
tweet_id (str): The tweet ID to retrievecomposio_auth_token (str): The Composio authentication tokenReturns:
dict: Contains tweet data or error informationDeletes a tweet.
Function Signature:
def delete_tweet(tweet_id: str, composio_auth_token: str) -> dict:
Parameters:
tweet_id (str): The tweet ID to deletecomposio_auth_token (str): The Composio authentication tokenReturns:
dict: Contains success (bool) and status messageThe skill requires the following environment variables:
COMPOSIO_CLIENT_ID: Your Composio client IDCOMPOSIO_API_KEY: Your Composio API keyCOMPOSIO_SESSION_TOKEN: Your Composio session tokenCOMPOSIO_BEARER_TOKEN: Your Composio bearer tokenCOMPOSIO_USER_ID: Your Composio user ID