Skip to content
Notes from the field

Notes from the field

Twitter API without libraries – for posting as yourself (e.g. a bot)

Twitter API without libraries – for posting as yourself (e.g. a bot)

2016-09-18

I have to say that the twitter API documentation is absolutely abysmal. It’s impossible to navigate – calls make reference to other calls but the major problem is that there are almost no examples – they almost all recommend that you use a library. So how on earth are you supposed to learn how the API works? How do you write a bot which tweets as itself (such as my https://twitter.com/EnfieldTownBot)?

anyway – i found a StackExchange article outlining how to use Twitter’s API from Postman – which handles the hashing for you.

Once I got a good grip on the API itself – which isn’t too bad – I now have to figure out how to create an Azure Function App to create and send the tweets – as OAuth 1.0 requires all messages to be signed (hashed). Twitter has a pretty good set of instructions on how to create the hash: https://dev.twitter.com/oauth/overview/creating-signatures

But – oh my gosh. This is a very complicated process. Here are some samples of libraries or code which i’m looking through to try to implement…

http://developer.pearson.com/learningstudio/oauth-1-sample-code

https://code.msdn.microsoft.com/windowsapps/LinkedIn-OAuth-Example-c06d64f5

https://github.com/bittercoder/DevDefined.OAuth-Examples

https://github.com/bittercoder/DevDefined.OAuth

https://www.devexpress.com/Support/Center/CodeCentral/ViewExample.aspx?exampleId=E20020

anyway, I didnt want to lose these links. I’ll come back to this later.

Share this:

  • Click to email a link to a friend (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)

how-to

Post navigation

PREVIOUS
How to: access the Honeywell Evohome API documentation
NEXT
BMW API now requires location, no bypass available
Comments are closed.

Archives

The standard disclaimer…

The views, thoughts, and opinions expressed in the text belong solely to the me, and not necessarily to the my employer, organization, committee or other group that I belong to or am associated with.

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
© 2023 Rob Aleck, licensed under CC BY-NC 4.0
Go to mobile version