Search box in Facebook Desktop

Aug 21, 2008 at 7:04 PM
Edited Aug 21, 2008 at 7:30 PM
I have two questions which I could not find the answer to after looking for several hours on Google with 20 FF tabs open :/

(1) Is it possible to add a search box to a Desktop facebook application?

What would the button do? Run a FQL query? (is there an easy way in the Facebook Toolkit to run FQL queries?)

Can you search and display results like Facebook does?  Shouldn't the be possible?

Shouldn't the Facebook API support searching for people?

2) What about view other users friends' list (ones who are not on my friends list).  It is possible through Facebook when you search someone.  They can have a "private" profile but you can still view their friends' list.
Aug 21, 2008 at 11:05 PM
1) You can run FQL using the FQL class in the facebook api.  But, you can't search for facebook, you can only essentially do the same things as the other api methods.
2) Unfortunately no.

I think these are both privacy issues.  Facebook is pretty strict about what they allow through the api, so that they can more closely enforce their privacy policies.
Aug 22, 2008 at 1:57 PM
I found a very easy workaround for this.

I added two tabs to my application.  The first one holds the profile, albums and friendslist classes, and the other -  a webbrowser class with homepage set to

The beauty of this solution is that it automatically logs you in with the current logged in user (when authenticating app on connect).  You can use the search box on your own Facebook profile in the Webbrowser class, and then just parse the output HTML to generate more information that you wouldn't have had before.

For instance, with this solution I created a function to parse "View Friends" of a user when clicking on his "View Friends" after searching in the webbrowser class.

This would give you a list of all of his friends' UIDs which you can use.

This is just an example, I'm sure you can think of more things to do.  For instance, you don't even have to have a webbrowser class.  You can just make a HTTP Request with the search parameters and retrieve + parse the output.

Aug 25, 2008 at 12:28 PM
See my response to one of your other posts -  I doubt parsing the HTML is going to get Facebook's seal of approval.  Obviously if you're not worried about that then I'm sure this will work, although it is a bit susceptible to changes that Facebook make to their site.  In my experience the 'Platform' doesn't seem to stay still for very long.
Aug 25, 2008 at 12:31 PM
Funny I didn't see your reply on my previous post.

I don't think it's too out-of-the-box.  I am not hacking anything, I'm not breaching security.
I am merely automating the information parsing that is available to anyone using Facebook.

In addition, when you say "seal of approval".  Approval for what?
Do they have some kind of QA for apps coming in? Are these only for "online apps?" (canvas).

Also, my friend told me to have a look at the "Are you interested?" application.  He says they use a lot of requests... Never used that app, but maybe you know something of it.

And I will have a look at the Facebook policy - so thanks for the heads up.

One last note on the matter - if Facebook changes their platform to NOT allow this kind of HTML-parsing - I would be happy.  Although, I still don't think it's a security breach.
Aug 25, 2008 at 5:24 PM
I agree you're not hacking anything or really breaching security.  The information is there for web users so why should this be an issue?  My view is that since they've provided an API for developers to use to interact with Facebook the implication is that that should be the only way for an application to interact with Facebook.  The only thing that I can find that might support this view is in the Terms of User for the site -  This states that:

"In addition, you agree not to use the Service or the Site to:
 - use automated scripts to collect information from or otherwise interact with the Service or the Site;

I may be completely wrong about this, so if you don't agree with me that's fine.  If you do seek to get any feedback from Facebook on this please post back here, I would be interested.

Desktop applications can be submitted to the Application Directory through the My Applications page.  It's my understanding that the application is subject to an approval process before being accepted.  I have yet to go through this so I'm basing this on what I've read in various forums.  This link is a little old and not specific to desktop apps but does give some explanation of what's involved -

Sorry, not seen the "Are you interested?" application.
Aug 25, 2008 at 5:39 PM
Just found this about an optional Application Verification Program -  Just thought I'd post it here as it's related.
Aug 25, 2008 at 5:44 PM
I agree with you regarding the Terms of Usage sample being quoted here.

However, "collect information" is a broad term which can mean a lot of things.

What I suggested does not store information anywhere.  All it does, is centralize, for the duration of the session, viewing of a user's tagged photos (albeit by using so called automated scripts - if by scripts you mean code and if by automated you mean an application :-/ ).

So I think that at the moment I am in no breach of terms of usage.

I won't want Facebook feedback on this right now, but maybe wait until I finish the app. - see how it runs, and what it does and then.

I'll keep you posted about my statistical findings and progress in the meantime.