views:

242

answers:

3

Hi Folks,

I am designing a twitter iPhone app for my school. I wanted to moderate the users who can access the school account. In simple terms i do not want to use the original twitter server but make it local to only few users. Simply lets say a twitter for class. This will be running on our server and only few people can access it. I am very cofused about this any open sugeestions would help me.

Please help

A: 

Create a regular twitter app that requires credentials, don't hard code the credentials in the app. Problem solved. Anybody could get the app on their phone, but only people previously authenticated on twitter would be able to actually use it. If you want to use Oauth you have do this anyway.

apphacker
+2  A: 

I'm not exactly sure what you mean by "not want to use the original twitter server". If you only want a few people to see the updates from that classes twitter account you could protect the updates and only allow students to follow the account.

However, this should help you create/customize your own twitter iPhone application. This is a link to Stanford's CS-193P course on Cocoa Development. The assignments in the class are creating and customizing a twitter client. All of the project files are available online.

http://www.stanford.edu/class/cs193p/cgi-bin/index.php

I hope this helps.

jluebbert
+3  A: 

Simplest way - twitter allows "protected profiles", where only users you are following can see your updates.. This is basically a whitelist of people who can see your statuses..

If you wish to allow multiple users to post from the same account, without hardcoding the twitter account into the application.. you could create your own API, essentially just a proxy for the twitter API..

You could then add your own level of authentication over this, so each user would have their own account (and you don't give out the shared account's login details)

In pseudo code, the application would be something like..

if request['username'] not in ['bob', 'alice']:
    raise AuthError

if request['password'] != ['theuserspassword']:
    raise AuthError

twitter_api = TwitterLibrary.login("sharedaccount", "secretpassword")

switch request['api_method']:
    case "getPublicTimeline":
        return twitter_api.getPublicTimeline()
    case "postStatus":
        return twitter_api.postStatus(request['something'])

Final option I can think of - you could run your own Twitter-like site.. There are plenty of "twitter clones", such as status.net (which is the code that runs identi.ca)

status.net and several other similar projects have Twitter-compatible API's, so you could quite easily take an open-source client (NatsuLiphone for example), and, with permission, rebrand and modify it to use the URL of your own site.

dbr