I am trying to implement a small Javascript / PhoneGap utility that can post twitter on twitter.
So far I have this:
var authorize_url = 'https://oauth.twitter.com/2/authorize';
authorize_url += '?oauth_callback_url=' + encodeURIComponent(mycallbackUrl);
authorize_url += '&oauth_mode=flow_web_client';
authorize_url += '&oauth_client_identifier=' +*****;
authorize_url += '&response_type=token';
authorize_url += '&client_id' + *****;
This resulting URL will show me the twitter login screen, and after logging in, the callback URL will be shown with two parameters; oauth_access_token and oauth_bridge_code
So far so good, but the next part confused me.
Is this oauth_access_token? Am I getting enough to tweet because of user? Or do I need to take additional authentication steps? If not, how can I use a token in a call to http://api.twitter.com/1/statuses/update.json to post a tweet?
The twitter API docs can't help me, so all help is much appreciated!
source
share