blog

Titanium Studio, Drupal, Services and Facebook Login

I got a question last week about how to make the Facebook Login work with Drupal and Titanium Studio. Well, is possible, is not as easy as you might think, so let's get started.

First, you'll need:

http://drupal.org/project/fboauth module and dependencies
Being confortable creating modules
Basic understanding of the Services module
The facebook-php-sdk in case you want to do more than just login
A FB app and the details

utneon's picture

Drupanium framework First Look (screencast)

In this blog entry you will have a first look at the drupanium framework that is being developed. There are a few points you need be aware of before watching the screencast. So here they are:

utneon's picture

Announcing Drupanium Framework

We are announcing today Drupanium framework! I've been discussing with Luis Elizondo how to make drupanium a better open-source solution for the community. So, we are building drupanium from the scratch! Luis created drupanium before titanium 1.8 meaning that there wasn't commonJS api available in the titanium SDK. Because Luis is very busy right now with his own projects I'm developing the architecure and API for the Drupanium framework. This means now instead you won't need to copy, paste, change code, (stuff like that) from the current drupanium_app for your projects.

utneon's picture

Drupanium open for collaboration

Hello Drupanium community! My name is Paulo Carvalho and I'm joining the drupanium team which is a project created by Luis Elizondo to help out building up the community and developing the project further. Obviously I am a drupal developer and an iOS Objective-C App Developer as well, so I will be taking part on this project on the iOS side of the thing.

Activity Indicators, Part II

Last time I talked about Activity Indicators, but I didn't cover really how to use them, just how to create them. If you haven't read the first part of this post, go ahead and do it and then come back here.

Let me give you more insight of what we're gonna do. I usually create a file to handle all the connections to the server. I call it "client.js" and this allows me to reuse the code over and over again. In this next example we'll just load a user from our Drupal site.

Replacing Titanium Studio IDE

I have a Macbook with only 2GB of memory, and when coding, I usually open Titanium Studio, Terminal, the iOS Simulator, Firefox or Chrome, and iTunes. That's just too much for my Macbook to handle, specially after upgrading to Mac OSX Lion.

If you're having this problem, you might need to change your IDE, use nano if you want to, after all, all you're doing is creating JavaScript files, and there are plenty of small and fast editors out there that can perform as good as Titanium IDE without eating all your memory.

Count characters like Twitter does!

Imagine you have a textarea but you can only accept 140 characters like Twitter does. You should provide a counter and disable any send buttons if the user exceeds the allowed characters.

Enought introduction, let me show you the code.

First, create the textarea and a label to hold the counter.

Non-blocking operations and deferred execution with Titanium Studio

If you use node.js then this will be really easy for you, if you don't use node.js, keep reading, I'll try to make things as simple as possible.

What's the problem? The problem is actually a very simple one, when your code performs an operation that needs to access the internet, you never know what's gonna happen, but your code keeps running, it won't wait.

If you're still with me, then keep reading, if not, please read the previous paragraph again.

Activity indicators

Sometimes you just want to tell the user to wait a few seconds until the operation finishes. But how to create some nice screen blocking progress bar? If you've been using Titanium Studio you know that the default activity indicators, is not as good as it could be. We need something like Twitter does. A blank screen with a message of what we're doing and why the user needs to wait.

The first thing we're gonna do is create a file with our code, we'll be calling the function inside this file every time we need an activity indicator.

How to post images to your Drupal site using Titanium Studio?

One of the questions people ask me is how to post images from your Titanium Studio app to your Drupal site. When I created Drupanium this was one of the missing pieces of the puzzle, but now I'll cover it here.

I'm not gonna post the image to a node in this example but that should be really easy to do if you've been doing it already.

The first thing I need to do is create a file utils.js, this file usually has some functions that I use regularly through my app. I'm just gonna insert here the function will be using:

Pages

Subscribe to blog