【问题标题】:Why do I get an error saying curl: no URL specified error while pulling a tweet?为什么我在拉推文时收到一条错误消息 curl: no URL specified 错误?
【发布时间】:2021-02-27 09:43:02
【问题描述】:

目标:使用推文 ID 提取数据

C:\Users\dell>curl -X GET -H "Authorization: Bearer https://twitter.com/KanganaTeam/status/1328213589698592768"

但是我收到了这个错误

curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information

【问题讨论】:

    标签: html curl twitter terminal command-prompt


    【解决方案1】:

    这不是一个完整的 curl 命令。您已将 URL 包含在授权标头参数中。

    你需要这样的东西:

    curl -X GET -H "Authorization: Bearer YOURBEARERTOKEN" https://api.twitter.com/1.1/statuses/show/1328213589698592768.json

    【讨论】:

    • 我们应该保持 YOURBEARERTOKEN 原样吗?
    • 否,您需要将其替换为您在创建应用时在开发者门户中收到的 API 持有者令牌。
    猜你喜欢
    • 1970-01-01
    • 2020-06-03
    • 2015-01-25
    • 1970-01-01
    • 2016-04-24
    • 2018-05-23
    • 2020-01-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多