# Create Twitter/X Feed

## User Intent

"How do I sync tweets from Twitter/X? Show me Twitter feed configuration."

## Operation

**SDK Method**: `createFeed()` with FeedTypes.Twitter\
**Auth**: Twitter API credentials

***

## Code Example (TypeScript)

```typescript
import { Graphlit } from 'graphlit-client';
import { FeedTypes, TwitterListingTypes } from 'graphlit-client/dist/generated/graphql-types';

const graphlit = new Graphlit();

const feed = await graphlit.createFeed({
  name: 'Tech News',
  type: FeedTypes.Twitter,
  twitter: {
    type: TwitterListingTypes.Posts,
    userName: 'graphlit',
    token: process.env.TWITTER_BEARER_TOKEN!,
    readLimit: 100,
    includeAttachments: true,
  },
  // Optional: add workflow for content processing
  // workflow: { id: workflow.createWorkflow.id }
});
```

***

## Configuration

**username**: Twitter handle (without @)\
**readLimit**: Number of tweets\
**includeReplies**: Include reply tweets\
**includeRetweets**: Include retweets

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.graphlit.dev/api-guides/use-cases/feeds/social-media/feed-create-twitter.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
