i am developing app.its having post message on facebook and twitter.i searched on net and got many example but i confused with twitter.
if i am using oath authentication how should i provide login screens for clients.many example
what i found just they are using consumer and secret key where i need to pass uname,pword
can you pl suggest me its very urgent to me
Thanks in advance
Aswan
Twitter using oAuth at present, so whatever api's you will get, they will open the official twitter login page in webview, so you cannot use your own login page for that, twitter does not want's that........Hope it help's youGood luck.......
I've done this using a WebView (to hold the login UI which comes from twitter.com) and Signpost for the OAuth authentication. There's a good example here.
However, this turned out to be a less than brilliant mobile user experience - WebView login screens just suck - so I switched to using XAuth instead of OAuth, which you have to apply to Twitter for. The benefit of doing that is that you can have your own custom login UI, which isn't web-based. Unfortunately Signpost doesn't yet support XAuth so I also changed to using a stripped-down version of JTwitter.
If you are interested in using Singpost and Android's HttpURLConnection to obtain access token based on username and password you can have a look at my post. I was referring to Twitter XAuth so that's should be what you looking for. It works for me.
http://3citydev.blogspot.com/2013/05/how-to-obtain-xauth-access-token-using.html
Related
Is there a way to implement oAuth flow without actually launching browser or even a webview on android?
What I want to show is a native Popup which asks user credentials and then supply it to oAuth provider.
Strictly speaking no, the main idea with OAuth is that you should never handle the user's credentials in any way.
But it depends on the provider. Twitter for example uses their own invention xAuth where you send the username and password in exchange for an access token. Twitter only allows this for applications that can motivate that need very well though.
So check with the API provider if it is possible in some way.
Recently i did some research regarding implement oAuth without using browser or webview. Nowadays some platform already has native way by using their SDK like google: https://developers.google.com/identity/sign-in/android/, linkedin : https://developer.linkedin.com/docs/android-sdk-auth#. You can search for other platform too.
Another chance i see is by using google "Firebase" : https://firebase.google.com/docs/auth/. Even though i am not yet really try to implement it, as my understanding we can create our own custom input on HTML and pass it to their Javascript oAuth SDK to do credential login transaction. Just my guess we can do it with android native interface too.
Any correction are very welcome. Thanks.
This question might sound kiddish to you but I have to ask it.
I need to login from my application to my server using Facebook credentials. Is it actually possible? If the answer is yes, please guide me on this.
Facebook supports OpenID, which you can implement in your app.
http://developers.facebook.com/blog/post/246/
You can actually log in to stackoverflow using your facebook account as it uses OpenID as well.
Rohit, what Will mean is you need to implement OpenID in your server. For that you need to write couple of pages in your web app, that will take care of OpenID Authentication.. then if you want your mobile users to login using OpneID, you can simple open that webpage (where you've implemented the OpenID) from within your application using some webview component or some other relevant component whatever it may be.. track user's navigation to success page to determine user is authenticated or not.
this is one way.. in other way.. there could be other ways as well..
good luck
You can check this two link :
http://developers.facebook.com/docs/mobile/android/build/
http://developer.android.com/tools/help/adb.html#directingcommands
From this two link you will get all the information for logging , sharing using facebook from your android application.
Any Example suggestion that really works currently with Twitter OAuth?
I just need a simple API to post from an Android App, no need for something fancy and full feature, something that just works fine for authentication, doesn't crash and can update status.
I tried at least 4 examples poested before, all of them fail at some point.
Regards,
I had success with the Twitter4J library. For my purposes the login credentials were hardcoded into my app though. It was not a situation where each user could log in to their own twitter account. But the library was very easy to use for retrieving statuses and posting a tweet.
Is there any SDK of Twitter available through which we can implement Twitter in our application? I want that my application would load on his/her Twitter account and then the tweet should be sent to his/her account, but I cannot find any simple examples.
Something like the Facebook Android SDK is what I'm look for.
You can use twitter4j. This site also contains some usage examples.
Unfortunately with the introduction of oAuth, login is no longer trivial. You have to register your application with Twitter (go to your account, then applications and add the app there). This will give you a consumer key/token pair, that you need for logging in and that you need to keep secret.
I've implemented this in my Android-Client called Zwitscher.
You can have a look at the Login procedure in the LoginActivity (of the v0.65 tag).
If you just want to post a tweet to twitter, use the Android SEND Intent. That way, the user can choose what he want's to do with the post himself. It's much easier for you as well. No worrying about OAuth etc.
As #Heiko said, twitter4j is quite good. You should use it.
For an example of how it works, I have created a simple sample app that can be found here.
Check that out, maybe it helps you.
AFAIK there is no sdk provided for twitter. You can however use XAUTH for twitter.
It is fairly easy to implement it.
This post might be able to help you.
xAuth Authentication for Twitter Share in Android?
I want to create a application where user can login with twitter account and whatever activity he does (depending on other cases) should be tweeted.
Now since twitter has removed basic authentication how to achieve this ????
Any help will be appreciated
You can use third party libraries to perform OAuth. See the following threads to get some insight on OAuth and how to perform 3 legged authentication:
1. Some questions about OAuth and Android
2. OAuth on Android
3. OAuth + TWitter on Android with code
Hope that helps...