-1

I need get a list of friends on Twitter.

I have done Authorization, received tokens.

In official https://dev.twitter.com/rest/reference/get/friends/list documents only the basic parameters of the request. How to paste the token? I don't know

Marklaim
  • 30
  • 1
  • https://stackoverflow.com/questions/54807221/get-twitter-friends-list-in-swift/54838712#54838712 – Naresh Feb 23 '19 at 06:01

1 Answers1

1

It is necessary to generate the following parameters oauth_signature

  • oauth_consumer_key
  • oauth_token
  • oauth_nonce
  • oauth_timestamp
  • oauth_signature_method
  • oauth_version
  • All the parameters of your query

Next, prepare the header body

<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

Add the header

"Authorization: <body>" 

And send a request

Endios
  • 51
  • 2