iOS and Twitter OAuth Login

I have recently been working on a iOS (iPhone) application for a client. This app needed to have the ability to post things to Twitter and Facebook.

Facebook provides a really nice SDK which (with a few hacks) provides an inline login dialog which handles all the oAuth details for you. It looks good and works well.

Twitter unfortunately does not do the same and while there are hundreds of Twitter-iOS libraries out there, they are all overly complicated and provide a UI which is not consistent with how the Facebook SDK does things, which if i want my app to appear good and consistent then they must look and behave the same.

The other main reason was because the libraries were overly complicated, they used the “Out of band” oAuth authentication which means a user has to copy a pin from a web page into the application, which is hardly a nice thing to do. Yet Facebook doesn’t have to do this. After a bit of investigation i found out twitter didn’t have to either.

To solve all of this i have created a simple demo application and library, utilizing the Facebook-iOS-SDK and PlainOAuth (by Jaanus Kase) projects as a basis and building what i wanted on top.

A lot of the code should be self explanatory. And below is a screen shot of what the end result is. You can find the project on git hub here:

OpenGL / Mesa3D programming in Visual Studio

Update: You will need to move the various .dll files into your project folder so they are in the path of the application, otherwise you will get missing DLL errors.

I am currently taking the Computer Graphics and Visualisation module at university and it require writing some programs in C using OpenGL / Mesa3D. Unfortunately the guides and tutorials they give on how to do it on Windows are from 1997, so i have decided to update them for 2010.

In this tutorial i am using Mesa3D 7.6.1, Visual Studio 2008. It also works with Visual Studio 2010 Beta 2.

The first step is to either download the Mesa3D Binaries from here or to compile them from source (compiling from source is pretty simple). Then extract the file somewhere sensible.

The second step is to setup a Visual Studio project so we can actually code something.

First create a new ‘Win32 Console Application’:


Then choose your options. I’m picking a Empty project for this, but modify the options to what ever your needs are.


Click finish then we, and we have our newly created project. Now we need to make a few changes, to include the additional libraries, and header files we require.


Open up project properties. Then under ‘Configuration Properties’->‘C/C’++->’General’ you have the ‘Additional Include Directories’ setting, open this up, and add a folder, and navigate to your Mesa3D folder and select the ‘include’ directory.

It has been noted that you need to have at least ONE .c / .cpp / .h file in your project for the C/C++ options to become available.


Then go back to project properties, now under ‘Configuration Properties’->‘Linker’->’General’ you have the ‘Additional Library Directories’ setting, open this up, and add a folder, and navigate to your Mesa3D folder and select the ‘lib’ directory.


Now you can do your coding as you like. Import code straight from your Linux projects (Use ‘Add Existing Items’) and it should compile fine if you have done everything correctly.

Anyway i hope this helps someone, if you have any comments for potential improvements or problems you are having, then please leave a comment and i will try to help out.