Starting February 9, we will no longer support free access to the Twitter API, both v2 and v1.1. A paid basic tier will be available instead 🧵 — Developers (@XDevelopers) February 2, 2023Fortunately, Dify also has an HTTP tool, which allows us to call external crawling tools by sending HTTP requests. Let’s get started!
Create from Blank
to start:
id
.
Click on Start node and add a new variable:
url
(this will be used in the following node) should be https://twitter.com/
+ user id
, such as https://twitter.com/elonmusk
for Elon Musk.
To convert the user ID into a complete URL, we can use the following Python code to integrate the prefix https://twitter.com/
with the user ID:
Environment Variables
. Click env
- Add Variable
to set the token value, so plain text will not appear in the node.
Check https://crawlbase.com/dashboard/account/docs for your crawlbase API Key.
/
, you can easily insert the API Key as a variable.
context
should be body
from HTTP Request node.
The following is a sample system prompt.
Preview
to start a test run and input twitter user id in id
Publish
in the upper right corner and add it in your website.
Have fun!