I can't see why not.
If I had to take a crack at this, I would do the whole thing in SQL on the backend and have a table with a bunch of columns of who is friends with who (if the DB isn't on a dedicated host, I would limit the friend feature to 200 or less to start), and last time checked in (something not really 'live' but with constant check-ins while the app is in focus to show 'online').
You could have an 'every X time' send a token-code to the server, add the data to keep the 'online' status valid, and also check for pending friend requests and their statuses as friends (online/offline). The token could be something random, or based off a name during a registration (simple encryption) and when they 'login' it'll check to make sure the user is who they say they are, and fetch the data as necessary.