OAuth integration in iphone app - iphone

I have one problem regarding OAuth integration in iPhone App.
Can anyone help me how to integrate OAuth 2.0 with facebook in iPhone ?
I have referred so many sites about OAuth but I haven't got satisfied answer yet. I referred this question of stackoverflow. There is one good option about ShareKit. But my client wants only OAuth 2.0.
I downloaded framework from google code. I integrated it in my application. But How to use it ? Without guidance I can't implement it in proper way.
I have got stuck between my application and 0Auth 2.0 since last 3 days. Please can anyone give me idea or demo project or any another tutorial ?

Rather than implement OAuth for Facebook, make use of the Facebook iOS SDK which makes handling Facebook Auth and Requests much easier. You can read about it and download it here... http://developers.facebook.com/ios/

I just done a research
This post will really help you
Also please look at the below posts
iphone-facebook-oauth2-graph-api
OAuth and Facebook iPhone SDK

The framework you mentioned in your post is not for OAuth 2, but for OAuth 1.0a.
You can try the OAuth2Client we developed for talking to the SoundCloud API. It's build against draft 10 of the spec. I'm not sure which one is used by Facebook. Unfortunately the spec is not final yet and over the years different services adopted different drafts of the spec.
If you're able to argue with your client I'd try to convince him to let you go with the official iOS SDK. This gives you many benefits like automatic token refresh, single sign on via the official app & much more.

Related

ios twitter OATH integration not working

I am using Oath authentication in my ios app for twitter integration.
It was working fine earliar but now when I authenticate user then it sends me on this page. Whats going wrong. is there any change in API?
I think you are using older API that stopped working So now you have to go for new Solution.
Apple Introduced Social Framework that Allows Facebook, Twitter sharing without doing much more & with less efforts.
use This.
Hope this will help.

OAuth Authentication Iphone

I am doing an iPhone app which requires OAuth 2.0 protocol to be implemented for the login of the user to a particular website. I have the client id and client secret which i got after registering my application on the website. I would like to know a few things about this.
I saw a number of links regarding this. But yet in my head I'm not very sure of whether i need to use OAuth classes or OAuth consumer classes?
Is authentication of the user possible in OAuth without sending the email id and password of the user in a query string?
Is is possible to load the website in a uiwebview and login to the website and get the user credentials for the further screen functionalities.
This is the first kind of such an app I'm developing. It would be great if someone could help me out so that i can know clearly how i should go about.
EDIT: if there any good tutorials for achieving Login to a website using OAuth please do share.
Thanks in advance
OAuth spec and documentations
OAuth 1.0 protocol: https://www.rfc-editor.org/rfc/rfc5849
OAuth 2.0 protocol: https://www.rfc-editor.org/rfc/rfc6749
http://oauth.net/documentation/getting-started/
http://hueniverse.com/oauth/
SDKs for OAuth on iOS
YToolkit (OAuth 1.0 & 2.0)
Source on GitHub
OAuthConsumer (OAuth 2.0)
Source on Google Code
Wiki
LROAuth2Client (OAuth 2.0)
Source on GitHub
Simple document
Demo project
MPOAuthConnection (OAuth 1.0)
Source on GitHub
Wiki
(Speaking of "a particular website", does it have official or third-party SDK for iOS? If yes then you don't need to implement OAuth authorization yourself.)
You can find a good tutorial on OAuth Tutorial.
This tutorial is a for MAC applications and uses Google OAuthCustomer library.
OAuthCustomer related readings and source codes can be find within the below URLs
Google OAuthCustomer
Sample Application
Make sure to remove non ARC stuff from the OAuthCustomer Library files for iOS applications

IOS Good practise to login using facebook and twitter

we are developing a platform with web and one iphone application. We have our own system for authentication but we want to improve it in order to support facebook and twitter login.
Through the web we haven't any problems, but through the mobile application we don't know how to manage correctly the facebook login and we don't find any tutorial or cookbook that explains what are the steps to do it in a good way.
Should the iphone application request the token from facebook and then send it to the server? Or is better take the facebook_id and then send it? Since we don't want to have two different accounts for the same person, is it necessary to check if the emails is already in database?
Any help would be much appreciate or at least one guide / tutorial in order to read about this topic.
Thanks!
"Any help would be much appreciate or at least one guide / tutorial in order to read about this topic."
For the Facebook authentication for iOS, see: https://developers.facebook.com/docs/reference/iossdk/authentication/

Integrate facebook connect/ twitter with jquery mobile

I am currently developing the mobile version of my site.
Can you please give me a tutorial to integrate Facebook connect / Twitter so users can connect.
This can help you : http://www.pushittolive.com/post/1239874936/facebook-login-on-iphone-phonegap
This blog post http://www.wisejive.com/2010/11/phonegap-jquery-mobile-twitter-and.html contains the detail answer for both facebook connect and twitter. Of course, as the blogger mentions he is extending on the technique provided at http://www.pushittolive.com/post/1239874936/facebook-login-on-iphone-phonegap.
If you want to avoid phonegap, this solution is pretty neat - http://www.egrappler.com/jquery-social-media-share-plugin-jsshare/
Otherwise, the newer phonegap friendly solution uses their plugins directly, which can leverage some native apps and avoid the difficulties of OAuth - https://github.com/davejohnson/phonegap-plugin-facebook-connect & https://github.com/phonegap/phonegap-plugins/tree/master/iOS

Using oauth for creating twitter application in iphone

I am creating a twitter application in iphone using oauth. But my application request for:
oauth_consumer_key,
oauth_signature_method,
oauth_signature,
oauth_timestamp,
oauth_nonce,
oauth_version,
oauth_callback,
Please anyone help me how to create all these keys for my application.
In my twitter account xauth is disabled by default. So, how can I enable it in my application?
It's highly unlikely you need to enable xAuth. The Twitter API documentation, specifically the authentication guide explain these parameters in more detail. Also have the OAuth 1.0 spec open to refer to, even if you're using a third party library- you will save your sanity if you understand the mechanics of the token exchange.
You'll need to read up about OAuth. All the fields are part of the standard. Twitter will give you the first one (oauth_consumer_key), and the version number is always 1.0. (Version 2.0 is not yet complete and Twitter doesn't use it.) The others you need to calculate. Or at least find an open source library that does it for you.
As for enabling xAuth, you need to send a message to Twitter. Sounds like they're getting more and more strict about which apps they allow, though.