Solo Project Day Three: The Day I Tweeted
I tweeted using my app (sort of) for the first time today! I say sort of, because I didn’t actually do it from my app, but I did use my my app’s credentials and my test user‘s credentials. I used a wonderful API testing app called Paw to do my testing today. It’s a really nice tool, and I plan to continue using it for this project.
// instantiates FastClick
Lastly, I began building functionality for the client-side code to send a created tweet to the server for the server to then post to Twitter.
- Twitter’s API Documentation:
- POST statuses/update - General information on how to POST statuses to Twitter. It turns out it’s much easier than I’d expected. If the user is already logged in, you simply URL encode the text, and then send it to Twitter in the request URL.
- t.co links - Twitter’s built in URL shortener — called
t.coafter the URLs it generates — works relatively automatically, with some caveats. When sending a tweet to Twitter, if it detects a URL in the text, it will automatically convert it to a
t.colink, unless it is less than the current maximum
t.coURL length. As time goes on, the length of shortened URLs grows as more and more unique links are used up. This means it’s important to check with Twitter what the current maximum
t.colink length is. This is done by periodically performing a GET request to Twitter’s help/configureation URL.
- GET help/configuration - Information on how to get configuration data from Twitter’s API.
- Angular $routeProvider - Once again looking into how to route a user to different pages based on their logged in status using
- Unirest - NodeJS REST API library for doing API calls from the server.