android openid authentication - android

It might sound silly but i went through a lot of code examples for Open ID authentication of android application. This one says
https://sites.google.com/site/oauthgoog/oauth-practices/mobile-apps-for-complex-login-systems/samplecode
that you have to make a webview and from webbrowser get the token and all but what i want is really simple , given options for google, facebook and twitter, I want user to select one and authenticate without any browser or so. Is that possible?
This one also i tried but it apparently seems to support only google accounts but i want all three
http://blog.notdot.net/2010/05/Authenticating-against-App-Engine-from-an-Android-app
Any help ?

OpenID technology is based on browser confirmation, so you can't identify the end-user without it. Take a look at this link: http://lists.openid.net/pipermail/openid-code/2011-January/000190.html

Related

What controls Twitter access rights, when using Fabric.IO and TwitterLogin in Android app?

What controls the Twitter access rights?
Is it the Twitter application as defined in my Twitter dev account?
Is it the Twitter Android API ?
Is it the TwitterLogin plugin info provided by Fabric.IO?
Is it a combination of these?
Is it something else?
Using Twitter as a Way to Identify User
All I want to do is use the Twitter OAuth which is provided by FabricIO and the TwitterLogin infrastructure so I can identify a user. In other words, let the user sign on using Twitter. However, I don't need or want more access to their account.
However, as you can see in the image below, the app seems to gain far more access to the user's Twitter account than I need.
Possible To Change?
Is it possible to change this so it is very limited? If so, where would I make those changes?
I just found the settings in my twitter dev account and it resolves some of this, but not all. However, maybe this is all it is even possible to control??
Go to https://apps.twitter.com/ (it'll take you to your twitter dev account).
If you have more than one app, choose the app you want to change.
Click the [Permissions] Tab.
You will see something like the following images:
Mine was set on Read & Write (2nd choice)- Image shows where I have now selected the Read only choice.
Click the [UPdate Settings] button and you get the odd screen that follows:
That made me think I hadn't chosen the correct choice (read only).
Finally, after a few minutes I refreshed the app settings web page and saw that it was on Read Only.
I then tried logging in using my Android application again and it now looks like the following:
Now, it cannot tweet for the user nor can it add users. It still seems a bit intrusive though, just to use it for Authentication.

Cordova / Phonegap app - change Facebook account

So I'm building an app using Phonegap, and will provide social login via Facebook, Google and Twitter.
When logging to one of those, it asks about permissions. Grant it, and you are logged in. Great. My problem is, if I want to connect with another account, how can I do that ? On a regular browser, I would go to Facebook, disconnect, connect the second account, and then come back to the app to connect with it. But Phonegap uses webviews, and no URL is available to get to Facebook and change user. Though, even when disconnectiong, it's impossible to connect with another account.
How could I solve that ?
Thanks ahead !
Impossible. Please refer to facebook documentation here.
https://developers.facebook.com/docs/facebook-login/
Actually here is the solution. Clear all the webview cookies when the user hit logout button using this plugin :
https://github.com/bez4pieci/Phonegap-Cookies-Plugin/tree/master
it is impossible please implement core Facebook sdk and you will get full control over Facebook sdk singing and sign out option for iOS here is a detailed tutorial.
http://m-farhan.com/2014/03/ios-facebook-sdk-tutorial/

Link to login to social Media from app

In my app I want to have a link or button that can use stored credentials to login to social media sites - say facebook. But, since I plan on having a multiple links/buttons to different sites that may use different login info, I cannot force users to login to my app using any of the social media credentials.
Please forget the storing of credentials for now - that is a different issue altogether.
My question is Can I send the user's info to Facebook to allow them to login without having to take them to the login screen? If so, where to best find the information to do that?
Sorry if this is a noob question, but I am a noob to app dev and still trying to get my direction. Any sites or links with information would be appreciated.
sorry for the answer but from my experience you need to go through Facebook API to log in an android application using facebook,same for other social network. No clue what you wanted to do use a HTTP POST with the credential ?
There is a serious security issue with what you're trying to do, because it's you're application that handles the social network credential and so you would need to encrypt them store them and so on...
So if you want to give a try to Facebook Android API it's here : https://developers.facebook.com/docs/android/getting-started/
Dealing with the Facebook API is too much easy. You will follow some steps to import it into your project. Register your App on facebook developer site. Put the facebook button into your layout.
When the user clicks on the button the API will handle all the subsequent steps starting from taking the user username and password and will reply to you with a temporary accessToken that will be valid for two months. This is the only communication way with Facebook API, if you want to give the Facebook API any info with any other way. I am sorry to tell you you will not be able to do that.

Android: How to implement "Facebook easy login"?

It's hard to explain in words what I'm talking about.
When you open an app on your phone, sometimes it requires you to give a username/email and password credentials. Some applications have an option to "Login with Facebook" and quickly allows the user to login to facebook. By doing this, it gives you a new account by using your facebook information (I guess?).
I know you can do this with my websites too.
My question is what is this called? does facebook devs have a specific name for this? If so, how can I implement it through android, and even through web development?
Thanks!!
UPDATE: For example: When you log into this stackoverflow site. You are able to click on the "login with Facebook" and quickly login without have to fill in information. I know it's the same way with the stackoverflow android app.
Facebook uses OAuth 2.0.
Related: OAuth Facebook API Tutorial
I think you are looking for the word "OpenID". Facebook logins are OpenIDs. Allowing users to use the same credentials for different webpages
What you are looking for is called Facebook Single Sign-On. The facebook developer docs should be enough to get you started.

Integrating Facebook and Twitter feeds in Android application

I'm adding social integration to my app, and am looking for general advice how to go about it.
At the moment the app is showing feed of particular Facebook wall (authentication handled by Facebook's Android SDK) and feed for particular Twitter hashtag. That's a start, but I want these feeds to do a bit more. For Facebook:
For long feed items, user should be able to "see more", including linked pictures
Links inside feed items should work and open in browser
Like/unlike feed items
Comment on feed items
Post on the wall (create another item in feed)
Similarly, for Twitter:
Links inside tweets should work and open in browser
Reply to, and retweet tweets
Create tweets that contain the specific hashtag
Since Facebook and Twitter both have comprehensive APIs and there are enough code samples floating around, this is all technically doable, but seems a lot like reimplementing Facebook and Twitter clients. That's a lot of work to get all the little details right, maintain code for API changes,
and not really in the scope of my app.
So I'm thinking how to avoid reimplementing Facebook and Twitter clients.
Idea one: direct user to mobile versions of the respective sites and be done with it. Downside is that user will have to go through cumbersome authentication, even if there are dedicated client apps already installed and authenticated on user's device.
Idea two: plug into existing apps using intents system: if official Twitter app is installed, use that to do hashtag search. If Seesmic or Twidroid or some other twitter client is installed, use that. As a fallback, open Twitter's mobile website in browser. Similar for Facebook. Downside here is that intents for "show facebook stream" or "search tweets for X" are not standartized. Most current apps don't even have documented ways to plug into them. Using undocumented entry points in those apps is possible but would make my app hacky and brittle.
So, this question, how you've been dealing with integrating bits of Facebook and Twitter functionality in your apps, or seen done by others?
Here is a good tip about how to implement twitter/facebook oauth:
Create new activity and name it OAuthActivity.
Create new class that extends WebView.
Follow the facebook developer guide for WEB applications (not mobile ones!) and implement oauth calls inside of your WebView. For Twitter use Signpost-core with signpost-commonshttp4 to get oauth (facebook uses its own variation of oauth so you need to do it yourself).
Override WebView so it closes itself when facebook redirects your WebView subclass to your callback url.
Use OAuthActivity to return OAuth key / secret to your main activity via RunActivityForResult.
This way screen orientation change will work; you will have same architecture for FB and TW.
I have implemented it this way, yet I can not share my code (it is licensed for my company).
When I added Facebook and Twitter integration into my app (shameless plug: Secret Message), I attempted to invoke an installed Twitter client app via Intent. It wasn't fun, because there is no such thing as a "facebook/text" or "twitter/text" Intent. I know some Twitter apps create their own, but they're not universally used or even known.
So the other option is to get a list of all installed apps and filter on those you want to display in a chooser for the user to select. But retrieving a list of packages and their user-friendly names takes forever. So I hated that option.
I ended up integrating a very simple GUI for both Facebook and Twitter into my own app, and just used OAuth to authenticate users.
I hope this helps you pick your direction.
implementing Twitter integration is pretty easy on Android (you can use Twitter4J which is a pretty nice Twitter Java Library to access the public web services).
To integrate tweeting/retwreeting is basic stuff once you have authenticated your twitter user (just have a text box to allow users to enter thei 140 characters and a button to submit it - creating tweets, retweeting, replying etc is all a matter of 1 or 2 lines of code using twitter4J). The link stuff requires formating your listview to handle weblinks and open as appropriate.
The toughest part of the whole twitter integration thing is getting the OAuth stuff done - there is a tutorial on how to implement twitter and the OAuth authentication stuff here
Unfortunately, I have never tried facebook integration, but hopefully someone will be able to help out with that.

Categories

Resources