How to configure HTTP module to use Twitter API?

If not the HTTP module, then how to do so with the Twitter “Make an API Call” module?

Context: I would like to reply to a Tweet that was posted earlier in the scenario.

From what I have been told, “Make is using version 1.0 of the API, not 2.0 so adjust endpoints accordingly”

…and from what I have Googled, I think this is in the right territory:

…using the optional, in_reply_to_status_id

Any suggestions and solutions greatly appreciated, thank you :slight_smile:

From this StackOverflow question I think the basic JSON is like so:

{
    in_reply_to_status_id_str: {Tweet ID},
    status: `@${User Name}, I like golf too`
}

…and there are some issues re: how the Tweet ID is handled (e.g. may need explicit handling as base64? FWIW, I tried both ...id and ...id_str wrapping the latter in quotes).

Every time I try this in Make, I get an error “[403] Missing required parameter: status.” …wtaf?

Here’s the setup…

create a JSON object:

use the Twitter API:

Results:

@mixelpix It seems like these objects like “status” are URL parameters and not body objects. Add them in the query string instead and see if that helps.

Thanks for the suggestion @Bjorn.drivn - I will give it a go but iirc e.g. using curl and given the API docs, the POST to /1.1/statuses/update.json requires the JSON as a data object (e.g. -d {"JS":"ON"}

LOL

Well… goes to show wtaf I know :innocent:

Thanks so much @Bjorn.drivn - I never would have even tried query params if you hadn’t suggested them :heart:

Good you solved it with our help @mixelpix :wink:

It actually does not, when you look into the API docs it states this:

curl -XPOST 
  --url 'https://api.twitter.com/1.1/statuses/update.json?status=hello' 
  --header 'authorization: OAuth
  oauth_consumer_key="oauth_customer_key",
  oauth_nonce="generated_oauth_nonce",
  oauth_signature="generated_oauth_signature",
  oauth_signature_method="HMAC-SHA1",
  oauth_timestamp="generated_timestamp",
  oauth_token="oauth_token",
  oauth_version="1.0"'

If you look at the URL, you see the “status” is a query parameter. Great you got it sorted now !

Thanks @Bjorn.drivn

I was mis-reading the blurb re: using “twurl”

You can use also use any other OAuth helper library you’d like such as twurl.

e.g.

$ twurl -d 'status=Test tweet using the POST statuses/update endpoint' /1.1/statuses/update.json

Hey guys! Would you have any idea of how to get an entire twitter thread? I’m pulling my hair out trying to make it work

@Pianity have you read twitter’s api docs? If not, start there.

@mixelpix I think he was asking for “suggestions and solutions”.

@Pianity I have no experience with this, so you’l have to check it out yourself :wink:
But try something with the search query API call. You can use a query like this:

from:{{user_id}} to:{{user_id}} conversation_id:{{tweet_id}}

It could look something like:

$ curl --request GET 
 --url 'https://api.twitter.com/1.1/search/tweets.json?q=conversation_id%3A1334987486343299072&result_type=popular' 

More information on building the actual query can be found here.

@1cloud certainly & hence I suggested reading the api docs because therein lies the solution.

What are you doing posting questions here then? :roll_eyes:

@1cloud if you want the question answered, I suggest you pose the question to the community. This thread already has a solution.