Api call using pure javascript



I stuck on one place where I have to fetch some timeline data of a particular user and refresh it after every 10-15 seconds.so instead of hitting server after every 10 to 15 heartbeats I want to fetch it from the client side.I went through twitter documentation but actually I didn’t get any docs for accessing timeline data using javascript of any particular user, not able to figure out how to send user token along with App Keys.

Here is what we are doing,

  • User comes to mobile app and gives access to twitter app to access his timeline
  • We get user token from twitter on mobile app and save on backend
  • We want to show user timeline (using authenticated request) on web portal

so here I want his twitter apps from javascript using these credentials.

Any idea how to handle this?

thank you in advance


Try looking at a library such as Codebird-JS which might help you with this.


Thanks, Andypiper,

hope so it will helpful for me.thanks for your quick reply