How to login a Drupal site from an iPhone app? - iphone

Supposed there is a page which is only accessible for authenticated users on a Drupal site. What library/tools are available for iPhone developers to:
login the Drupal site (username password)
access the page with a loggin status
For example, I'd like to fill a UITableView with data from the Drupal page. Thanks!

You need a way to communicate with Drupal. You can do this with the "Services module". Download it from the drupal community.
After that, on your iPhone app, you need a protocol to retrive and send data to Drupal. The most used with the Services module is XMLRPC, but you can do it with Json and even plist. In the iPhone side we're using a Cocoa XML-RPC Client Framework made by Eric J. Czarny, from Divisible by Zero.
This way you have default methods (node.get, user.login....) to retrieve info from Drupal. You can create your own modules too.
It's not complicated. We have created an app that communicates with Drupal, but its a bit extended to explain it in just a few lines.
Start by downloading the Services module, configuring it and testing with XMLRPC Server. After that, the basic work is done.
Good luck :)

Related

Iphone Application with Symfony 1.4

I'm building a simple iPhone app that synchronizes to a webservice served by Symfony 1.4. This app requires the user to be logged in.
My question is, how can the user log in Symfony from the iPhone app? And how can I keep the session opened through the next petitions? Is this secure?
Chapter 15 of the Practical Symfony book talks about webservices, but I can't find any guide about sessions.
Thanks in advance
You can use SOAP web service also. But this is little complex. You can send the file attached to XForm and Post to the service
Detailed implementation of SOAP in PHP
http://www.vankouteren.eu/blog/2009/03/simple-php-soap-example/
You can build a rest service for symfony modules. You can get login through REST service.
Your example service will be like this
www.example.com?username=user&password=pass

can web2py support RESTful api calls? if so any pointers on how to build one?I

I want to configure a simple webapplication to support an iphone app to connect with it in RESTFUL ways. Initially have a user login session enabled from the iphone to the web app. I'd like the iphone app to send a NSURL call to the webapp, with user and password and have the webapp respond if the suer exists or not. Pretty simple. And I want to do it with web2py. Is this possible? Any clues?
I think you should post it to web2py group on google groups.
web2py#googlegroups.com
I know this question is a bit old now, but Massimo recently posted a video demonstrating a new experimental RESTful API for web2py. See also the Google groups posting "video about new RESTful APIs" .

Is it possible to create a desktop app using facebook oauth 2.0 authentication without requiring a browser interaction?

Is it possible to have a client app which can authenticate using Facebook but without requiring browser(I mean no embedded browser in the code)?? User inputs the username/password and allow access to app using the client app only.
Any Suggestions will be of great help.
Thanks,
Tara Singh
Edit: I have created app in Python which requires browser interaction. Now I want to get rid of that and do it using my client app only. Any Links/Tutorials??
Thanks Again
I know this is an old question and it's answered but I thought 'horse mouth GET'. From Facebook: https://developers.facebook.com/docs/authentication/...
Our OAuth 2.0 implementation does not
include explicit desktop app support.
However, if your desktop app can embed
a web browser (most desktop frameworks
such as .NET, AIR and Cocoa support
embedding browsers), you can use the
client-side flow with one
modification: a specific redirect_uri.
Rather than requiring desktop apps to
host a web server and populate the
Site URL in the Developer App, we
provide a specific URL you can use
with desktop apps:
https://www.facebook.com/connect/login_success.html...[cont]
Actually the answer is absolutely not.
In order to authorize your app a user has to enter their facebook username and facebook password on facebook site and you need web browser for this. There is no way to skip this step (you can't ask what their username and password are and then exchange it automatically for access token). You can read more about this here.
absolutely yes, but, we'll need to know which programming language you want to use before we can give much advice.
For example, it's possible using httpclient for java and python to encapsulate all the functionality you need, others can chime in with libraries that they use for C, C++, perl, etc.
[edit]
search for httpclient and how it's used with python. if you run wireshark on your system, you will be able to watch the data interchange (if you don't understand the http protocol completely) and then implement that in your code.[/edit]
Some good links in this regard:
http://developers.facebook.com/blog/post/289/
https://developers.google.com/identity-toolkit/
https://developers.google.com/accounts/docs/OpenID
http://facebooktoolkit.codeplex.com/
http://csharpsdk.org/
http://blogs.msdn.com/b/appfabric/
Apparently now you can, if you're a beta tester for their newest feature: https://developers.facebook.com/docs/authentication/devices/ Reminds me of PIN's on Wifi
Yes and no,
I've had the same problem with my server. It was console only, so I had to make a solution. First I've logged in using the lobo java webbrowser. I've transfered the cookies of lobo to my server.

Creating Facebook App

Im new to facebook applications. I recently created a webapp that consisted of html & php. But recently Ive decided that integrating my webapp within facebook would be useful. Any tips on where to start? Ive looked over developers.facebook.com and im confused. It appears they are in the process of updating. Ive come across a few guides but there from a few years ago. This app will run completely within facebook and im probably gonna have to rewrite all the code. Any guides or suggestions?
Thanks!
You didn't specify the programming language you're using but if you're developing asp, start by looking into Facebook c# sdk here: http://facebooksdk.codeplex.com/
If you're using any other language (i.e. php), try looking into respective software dev. kits (i.e. facebook php sdk). They will facilitate your job in comparison to starting raw development all by yourself.
Tim, if you want to get into the business of working with Facebook, you need to know right away that they are always in the process of updating. That being said, you should learn some Facebook terminology so you can do more research and figure out what you want to do.
Applications that run within the Facebook interface are called Canvas Apps. Your application is hosted on your own server, and Facebook simply adds an iframe in their UI that points to your app's URL.
Another way to go to create a webapp that uses your own design, but still utilizes a single sign-on system from Facebook. This used to be called a Connect App but now they don't really have a name for it. Basically, you can use Facebook's authorization system to pull Facebook user data into your own database, which basically eliminates the need for a registration page. The authorization system prompts the user to allow your app to get specific data about them - once they authorize it, your app has access to do whatever the user gave it permission to do.
The best document to wrap your brain around is about authentication: http://developers.facebook.com/docs/authentication/
Give that a whirl, and good luck!

how to login/SignUp to a webserver from iphone applicaton

I wan the following functionality in my iphone application
User Register/signup form my application to the website(mysql/php)
User login to the site from application.
User write comment on pictures from application.
Please help me out.
The easiest way is to extend your website to support some flavor of web service (REST, SOAP, etc) Then your app can simply call the web service methods to do the various operations you listed.