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?
Related
I already read a post here How to send friend request using Facebook dialogs on Android?
However, I'm not sure how to implement the advice. It seems like the accepted answer is now unavailable from facebook. And the second answer, which seems to be how people do it now, I'm not sure what params to use and I can't find it anywhere in the facebook docs.
Here is some info on how to send requests from facebook.
https://developers.facebook.com/docs/android/send-requests
I suggest you download the sample app (FriendSmash) to see how they implement Facebook api on Android application
i have the following problem: I tried to post sth. to Facebook by using ACTION_SEND Intent to pass a String to the Facebook application.
Now I know this is currently not possible.
I don't want to code my own Facebook login, logout, session handling stuff in my application.
Question is:
If someone has the Facebook App installed and is logged in,
can I use the authentification information to post sth. on his Facebook wall?
Or, what is the easiest way to get sth. posted?
thanks
I would recommend using the Spring Social Facebook library. It will take care of all the OAuth stuff for you and provide you with a nice Facebook API you can interact with. The API allows you to do a lot more things than just post.
The downside is you have to install the jar files with your app and do a little setup. There is a good example of how to do this for Android in the spring-android-showcase-client in the spring-android-samples project.
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.
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