【问题标题】:Getting Twitter friends list获取 Twitter 好友列表
【发布时间】:2017-02-24 19:30:41
【问题描述】:

我需要在 Twitter 上获取朋友列表。

我已经完成授权,收到令牌。

在官方https://dev.twitter.com/rest/reference/get/friends/list 文档中只有请求的基本参数。如何粘贴令牌?我不知道

【问题讨论】:

标签: twitter


【解决方案1】:

需要生成以下参数oauth_signature

  • oauth_consumer_key
  • oauth_token
  • oauth_nonce
  • oauth_timestamp
  • oauth_signature_method
  • oauth_version
  • 查询的所有参数

接下来,准备标题正文

<body> = "oauth_nonce=" + oauth_nonce + "," +

"oauth_signature_method=" + oauth_signature_method + "," +

"oauth_token=" + urlencode(oauth_token) + "," +

"oauth_timestamp=" + oauth_timestamp + "," +

"oauth_consumer_key=" + oauth_consumer_key + "," +

"oauth_signature=" + urlencode(oauth_signature) + "," +

"oauth_version=" + oauth_version

添加标题

"Authorization: <body>" 

并发送请求

【讨论】:

    猜你喜欢
    • 2013-06-22
    • 1970-01-01
    • 1970-01-01
    • 2011-12-12
    • 1970-01-01
    • 2023-03-03
    • 2012-04-03
    • 2021-10-03
    • 1970-01-01
    相关资源
    最近更新 更多