Twitter API calls (similar to how Facebook API is done?) – Education Career Blog

I understand that the Twitter API documentation is fairly substantial, but I was wondering if there is simple way to access Twitter API which is similar to Facebook’s API?

For instance, we can access facebook’s APi as follows:

Notice the parameter access_token appended to the URL.

Can we do something similar in Twitter’s API ?

For instance:

Is it possible? Or am I missing something?

Best Regards.


If you just need to search Twitter, then you don’t have to use the API. For example, if you want to search for “django”, simply request and you’ll get your json.

Using the API requires that you first use OAuth to authenticate (Basic authentication is no longer supported). If you are familiar with the Facebook API, then perhaps you are familiar with oAuth already, as the Facebook API also uses OAuth.

Once you have the authorization info for your user, you don’t pass it in URL, but in the request header, along with the URL for what you want, such as if you want the user’s home timeline.

If you’ve registered a Twitter application, then you can use Twitter’s API console at to see what various requests and responses look like.

Here’s a full header example:

GET /1/users/show.json HTTP/1.1
Accept: */*
Connection: close
User-Agent: OAuth gem v0.3.4.1
Authorization: OAuth oauth_nonce=\"ijasef982JIOase09u23f90ha3f9u53OWEIFH249A1X\", oauth_signature_method=\"HMAC-SHA1\", oauth_timestamp=\"1287510730\", oauth_consumer_key=\"091oi0uJH23h080hfaAF2z\", oauth_token=\"1515151-X09WeowihwefOIWEOFIHWEFo09823408924f08heFK\", oauth_signature=\"Jht%2FEk98092j3fSAI0923fLXpw%3D\", oauth_version=\"1.0\"

Leave a Comment