> For the complete documentation index, see [llms.txt](https://docs.graphlit.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.graphlit.dev/api-guides/use-cases/feeds/social-media/feed-create-twitter.md).

# 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

***
