Create Twitter/X Feed
User Intent
Operation
Code Example (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
Last updated