connecting to Facebook via custom UI through using the xauth - facebook

I am working on a mac application which involves Facebook support so that they can share to Facebook via our app.
For this, I am using Facebook Graph API's which internally uses oAuth protocol to access user resources. In this process, it uses webview to enter users credentials(username and password) which provides the "Access_token".
But my requirement of the application is that it should not use webview to enter user credentials rather it should use other view controller to provide user credentials. So I need to go for xAuth protocol as in twitter uses.
Can anyone help me in this issue? If facebook supports xAuth, please make suggestions.

Facebook doesn't offer "desktop" application authentication support as detailed here: https://developers.facebook.com/docs/authentication/
What you would have to do, is get them to authorize your app on a website, then use the access token for the desktop app and that is if your app is connected to some kind of server.
Otherwise you will have to follow their suggestion of embedding a browser and reading the access token once it is received.

Related

OAuth 2.0 protocol in native Apps, e.g. Instagram

I am currently building an API for my native App and want to implement the OAuth 2.0 protocol for authentication. If I take a look at companies like Instagram, Facebook or Twitter I wonder how they are handling the authentication process of their own native App (not third-party).
So Instagram for example is using the OAuth 2.0 protocol to protect their API endpoints (here). Related to their developer platform they offer you - as a third-party developer - the possibility to use their API and authenticate your own App via Server-side (Explicit) or Implicit flow. All of these flows require the user to authenticate via an In-App browser (or system browser).
Like I said before, I am wondering how these Apps are handling the authentication in their own Apps. The user doesn't get redirected to any browser to authenticate. They could use the Explicit flow and store the client_id and client_secret for example in Keychain (iOS). But Instagram is telling third-party developers "You should never pass or store your client_id secret onto a client. For these situations there is the Implicit Authentication Flow.".
I don't want the user to get redirected in my own App. The user should be able to use a login/signup form within the native App.
Does anyone have an idea or insides on how Instagram etc. are doing it? I am really curious and appreciate any helpful answer. :)

Is it possible to get facebook login status using Graph API?

I have a page with Facebook connect button. After the user clics on the button and grants the required permission, I need to check the login status.
Is it possible to do that without using javascript ? probably using the Graph API.
I'm using APEX and the page contents will depend on whether the user is connected to my app or not.
For info the user is asked to connect to my app using login page :
https://www.facebook.com/v2.10/dialog/oauth?client_id=xxx&redirect_uri=www.example.com&scope=public_profile,email,user_friends
Thanks for your help.
There is, but using the Javascript SDK is encouraged for web applications. See Facebook's documentation for implementing login on other platforms, specifically when dealing with browsers that don't support Javascript.

Facebook client login for windows phone 7

I want to make a simple Facebook client for WP7 and I'm looking at how I should do the login.
There's a tutorial here where the client is asked to authenticate through the browser.
I'd prefere doing the login within my application and I need more than just to 'grant acces', I need the users wall feed, friend list, messages etc.
Any idea how to do the in-app login?
I think you cannot authenticate the user directly from your app, with out the help of browser. Facebook won't allow it.
Anyway you can take the help of the Facebook SDK, which helps in the authentication process.
Refer this Blog for the implementation of the Facebook SDK for WP7
And additionally, you can get all the permissions that you need, by specifying the Extended permissions in your authentication process.
There is also the updated article from Nokia if you want to find more here

linkedin connectivity from my native iphone application

hello everyone i am new bie in iphone development i want to connect to linkedin from my native iphone application i am currently having no idea how to connect to it please guide me how could i do that
From http://www.zhangkf.com/2010/06/linkedin-developer-network-oauth-authentication/:
Yes you can get connected with Linedin withyour Native Application by
following simple steps:
You get an API key from LinkedIn. This is also called a Consumer Key in OAuth terminology.
You build a feature into your site that leverages the user's LinkedIn network.
Your user clicks on your UI to request to use that feature.
You make a call to LinkedIn to ask to use our authentication. This is called getting a Request Token.
LinkedIn replies with an OAuth Token indicating that you can use the authentication system.
You send your user to a LinkedIn URL. That URL includes the OAuth Token you got and a few other parameters such as a URL for LinkedIn to
return the user to after granting access.
The user grants access to your application by signing into that page.
Upon successful signon, LinkedIn will return the user to your site.
You will then make a call to LinkedIn to get an Access Token.
LinkedIn replies with an Access Token for the user. You use that Access Token for any API calls to LinkedIn to identify the user on
whose behalf you are making the call.
Or
Download the Code from here,you could get it.Just Provide your API Key and Secrete Key
http://github.com/ResultsDirect/LinkedIn-iPhone
Or see this for details:
http://developer.linkedin.com/docs/DOC-1008
This sample is 100% complete and working, just add your app key.
Built with the latest XCode 4.01.
Uses a UIWebView so you have the option of customizing the browser UI.
Uses JSON instead of XML, which is the preferred best practice for most cases
OAuth is heavily documented so you know what's happening
Tested with iPhone 4, iPad 1, and the simulator on iOS 4.x.
http://lee.hdgreetings.com/2011/03/iphone-oauth.html

Custom login form to Facebook on an iPhone app

I'm trying to make an application that can connecto to facebook. I've found Facebook Connect for iPhone and I don't like the login form that it has.
Is there any way to make a custom login form? Is there some api functions to call to login an user on Facebook?
Thank you.
I would recommend not going this route. I'd be suspicious of any app that's asking for credentials that's not using the de-facto standard login control. If there is no standard control, then I have to take my chances with whatever the app presents, but in the case of Facebook, the standard control is part of Facebook Connect.
Just use one of the other API's such as the REST API and then create your own UI to capture the login credentials and call the REST API to login.