iPhone: Beta Features of Facebook Connect
I have an iPhone app idea that will include viewing your news feed(开发者_C百科 stream ) in an iPhone app. There is a lot more to it than that, but I'm wondering why I can't find any apps on the app store that lets you view your stream in some way. Does anyone know why?
Does facebook frown on this? There is a API method stream.get that lets you do this but it's in beta. Is it a bad idea to use the beta methods in an app?
I'm just suprised that there is so many different twitter clients but there is just on facebook client and why hasn't created streams in an iPhone app besides the main facebook app?
I have implemented what you are talking about and my app is in the App Store, albeit only in a couple European stores currently. It was, however, reviewed and approved in the US App Store. I can't send a link for it currently as we are not yet announcing it in the US (until December), however, I assure you it can be done and is not too hard to implement.
I don't think Facebook frowns upon this so much as I think their API just hasn't matured enough yet. It's getting there, though. I think mostly what you see (or don't see in the App Store) is from a lack of vision for how to use Facebook for applications. The official Facebook app provides what users need but ideas like yours are going to grow as more and more people (developers/entrepreneurs) realize that Facebook is not just a social network, but an entire social networking platform they can leverage in a powerful way... Ok. I've said too much. Cool stuff is coming in December, though. ;-)
If you don't want to use the beta features, you can go for FQL to get what you want. Here is the code I used to implement pulling the last 20 friend status updates:
NSString* fql = [NSString stringWithFormat:
@"SELECT uid, pic_square, name, status FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = %lld) AND status.time > 0 ORDER BY status.time DESC LIMIT 20", fbSession.uid];
NSDictionary* params = [NSDictionary dictionaryWithObject:fql forKey:@"query"];
last20FriendsStatusRequest = [FBRequest requestWithDelegate:self];
[last20FriendsStatusRequest call:@"facebook.fql.query" params:params];
And then the delegate callback looks like this:
- (void)request:(FBRequest*)request didLoad:(id)result
{
if (request == last20FriendsStatusRequest)
{
// Callback to my delegate here. result is an NSArray*
// of NSDictionaries* containing key-value pairs for the
// fields you requested in the query, e.g. uid, pic_square,
// name, and status. pic_square is the URL of the user's
// profile picture icon.
}
}
Let me know if you need any more info.
I guess people haven't found a use for it. Other developers may be afraid of the beta tag (yes Facebook, unlike Google, treats it as a beta tag -- it's subject to change and may break your app). It's up to your judgement if you think it's "safe" enough. We're currently developing a commercial iPhone application that uses stream.get.
On the desktop there are multiple apps that user Stream.get(), which could as well be done on iPhone
精彩评论