I'm now dealing with twitter API and my app posts some text to twitter. I managed to get acces to my twitter and i can post now to my twitter using ma app's consumer key and consuer secret, also using my access key and access token for authenticate me. But how do I post messages to someone else's twitter knowing only his password and login? Do I need somehow to get his access key and access token? How?
previously it was possible to post Tweet remotely using username and password. This can not be done anymore.
All methods of status update using curl / json are deprecated and not functioning.
Twitter requires you to use OAuth 100% of the time now.
Related
does anyone know if the new Google's Firebase can post tweets to Twitter?
I checked Google's Firebase website and it mentions that users can authenticate using their services. Once this authentication and authorization is done, I should have the required keys to access Twitter's API.
However, I was wondering if the Google's Firebase (Android SDK), can post tweets using one of its classes or methods automatically (without having to send an independent REST request from the Android app).
There is no API in Firebase that posts to Twitter.
But you can get the access token when the user signs in and use that to post to twitter in your own code. For more info, see https://firebase.google.com/support/guides/firebase-web#get_the_access_token_numbered
According to
firebase.auth.TwitterAuthProvider one can store the access token and secret to access the twitter APIs. Though Get the access token there is an explicit warning of Twitter API not directly invokable! The authdata structure will return everything needed for the twitter API. And then you need to use Android OAuth2 to set the proper parameters with the different Twitter APIs.
I want to get twitter access token by just passing twitter user name and password.
Is there any way to get this?
Help me to solve this issue
Yes, you can. Twitter provides xAuth which allows you to submit a username and password, then get back your tokens.
Please note, there are two main restrictions.
You won't get DM access.
You need to specifically request xAuth access from Twitter
xAuth access is restricted to approved applications. If your application is a desktop or mobile application that has no other recourse but to utilize xAuth, send a detailed request to https://support.twitter.com/forms/platform.
I would strongly suggest that you find a way to incorporate the normal oAuth flow into your app.
I am trying to practice the examples in the book "mining the social web". Unlike the applications I had created in twitter and facebook, the Oauth token and secret in the linkedin never show up. I only see my client ID and client secret.
by the way, since I do not have any personal url, can someone explain to me what is the appropriate URL I should enter? In the twitter and facebook applications, I just randomly entered some URL, like www.twitter.com, and it worked. In this application for linkedin, I entered www.linkedin.com, but no Oauth token comes out.
I know this question is too basic for you guys, sorry for posting this. I did google the solution for a while, but it seems like no one has ever posted this question.
You can't directly get an OAuth Token. You have to follow the authentication procedure to receive an OAuth Token.
Steps involved:
Configure your LinkedIn application with a valid callback url which your server is listening to.
Request an Authorization Code
Exchange Authorization Code for a Request Token
This LinkedIn link will help you on what parameters to send in each request and the URL for the same.
https://developer.linkedin.com/docs/oauth2
I am writing a custom API for twitter which will be used in Twitter for iPhone. what's the response my third-party API gives to twitter can make twitter think the user is logged in.
I know the twitter for iPhone auth step is using XAuth to /oauth/access_token, when it is set my API, I will gives the response 'oauth_token=191074378-1GWuHmFyyKQUKWV6sR6EEzSCdLGnhqyZFBqLagHp&oauth_token_secret=NpCkpRRC5hGEtikMLnQ2eEcEZ0SIVF5Hb2ZgIwmYgdA&user_id=191074378&screen_name=oauth_test_exec&x_auth_expires=0' directly to twitter for iPhone. but twitter tells me server intern error rather than a correct response. what is the incorrect part ?
Now that you have revealed your OAuth tokens anyone can copy them and use them to violate the Twitter TOS. You should go to dev.twitter.com and reset your OAuth tokens immediately. This is why it is called and OAuth Secret.
I am using facebook SSO in my iOS app and that works alright.
Now I would like to use that information - the user being verified against facebook with his uid - on my server backend. But how can I - securely - pass this information to the server?
My guess is that I'd need to send the uid and probably the authToken I got from facebook to my server? Could someone outline a general approach to that?
Even though it shouldn't really matter for my question, my server is running rails and devise for authentication. I also have facebook login working there separately, but I want to use the already done authentication from the client on the server. Confusing...
I came across this post which helped me understand the problem and solution.
Correct me if you see any issues.
The idea is to pass the auth token to the rails app. The auth token only works if both apps use the same app secret.
So the flow is like this:
iOS authenticate. Take the user's Facebook auth token and send to rails app.
Rails app takes auth token, posts it to graph.facebook.com/?auth_token=XXX. Response should be a json object of the user.
Take the user object response to find the UID and match it with a user in your database. If UID doesn't exist, create a new user and set the new UID.