Twitter Rest API integration in hybrid mobile app

javascript

#1

I am working on twitter integration in Hybrid mobile app and need to implement following features

  1. Using Twitter Rest API
  2. Login with twitter

At twitter developer page, i saw “Reminder: It is strongly discouraged to use OAuth 1.0A with client-side JavaScript.” because of security problem (leaking consumer key and secret).

  1. So, Do i need to write server side code to use Twitter Rest API ?

  2. If so, then to keep my app upto date, Do i need to call server side code repeatedly ? and isn’t is time consuming ?


Login With Twitter in Hybrid App
#2

If you need to make Twitter API requests in JavaScript client side code, yes you need a custom backend that handles stuff for you.

This depends on how you design it, but yes it is time consuming and a lot of work. (As developing things nearly always is ;))


#3

Thanks ePirat,

If you need to make Twitter API requests in JavaScript client side code, yes you need a custom backend that handles stuff for you.

Is there any possibility that, i can do only authentication on server side to get access token and then using access token on client for making rest api call ?

This depends on how you design it, but yes it is time consuming and a lot of work. (As developing things nearly always is

Can you suggest me any design ?


#4

If you do it right, that would be possible, yes.

Sorry, no. Maybe other users have more experience with this and can give you any advise. :slight_smile: