Basic Android Facebook interface(repost)

Closed Posted Nov 22, 2009 Paid on delivery
Closed Paid on delivery

I need some Android code that will allow my existing Android app to connect to Facebook.

The code you supply must do the following:

- Login as a user

- Retrieve the user's status

- Retrieve the user's list of friends

- Retrieve the status of each friend

- logout

## Deliverables

The code you write should connect to Facebook using one of their supported interfaces. It should follow Facebook's standard recommendations for security and best practices.

I expect the code you deliver to expose an API like the following.

(You will implement the FacebookConnector class, and your code will communicate with a FacebookClient in my code. ? The implementation should be asynchronous. I will request actions from you. Your code will return immediately, and will later notify me when it has results):

// (I assume that the Facebook API you use will have a notion of

// a? userId -- a type that can represent either the logged in

// user or? a buddy. I'm assuming that this userId is a string.

// If the userId is an? integer, or if you need different types

// for the logged-in user and his? buddies, feel free to make

// the obvious changes to my interface).

class UserId {

? ? private String userId;

? ? ...

}

interface FacebookClient {

? ? // Callback to report an error (connection errror, login

? ? // failed, invalid/ userId token, etc.)

? ? // Pass back a string or object explaining the error.

? ? void error(...);

? ? void loginOk(UserId userId);

? ? // Return a user's status.

? ? void gotStatus(UserId userId, string status);

? ? // Return a user's friends.

? ? void gotFriends(UserId user, UserId[] friends);

}

class FacebookConnector {

? ? // Initialize the interface. You can require more parameters

? ? // here, if? needed. (e.g. Facebook application tokens).

? ? FacebookConnector(FacebookClient callback);

? ? // Callback when login has succeeded.

? ? // Later deliver success or failure back to me? by calling

? ? // [url removed, login to view](...).

? ? void login(String username, String password);

? ? // Only valid to call this after login has succeeded.

? ? // Get a user's status.

? ? void getStatus(UserId userId);

? ? // Only valid to ? call this after login has succeeded.

? ? // Return all of the user's friends. (Note that I only need

? ? // to call? this for the logged-in user).

? ? void getFriends(UserId userId);

? ? // Done

? ? logout();

}

Note: if it is more efficient for facebook to return multiple statuses at once, please add another method getStatus(UserId[] userIds) and appropriate callback.

Android Engineering MySQL PHP Software Architecture Software Testing

Project ID: #2982642

About the project

7 proposals Remote project Active Dec 15, 2009

7 freelancers are bidding on average $273 for this job

foreignt

See private message.

$476 USD in 7 days
(29 Reviews)
6.4
uprightech

See private message.

$127.5 USD in 7 days
(30 Reviews)
5.1
shiva1977

See private message.

$59.5 USD in 7 days
(27 Reviews)
4.6
adex08

See private message.

$382.5 USD in 7 days
(6 Reviews)
4.1
donofdons

See private message.

$595 USD in 7 days
(13 Reviews)
3.4
imran514

See private message.

$85 USD in 7 days
(4 Reviews)
3.1
indictrans

See private message.

$187 USD in 7 days
(0 Reviews)
0.0