Alright, I fear I may be critiqued for this not being so much of a "programming" question, but I'll ask anyway. I don't do to much in web development-type stuff (OO is what I stick with mostly), so I'm not too keen on exactly how all this CSS, Javascript, SQL, etc works.

The problem: My friend has been trying to quit smoking for a while, but as many smokers do, he seems to only make it so far. He recently posted a status update saying if he had the moral support, he could do it. I simple want to create a link to the "Like" button. I then intend to write a script and simple message all his friends with the link. Is this possible?

Any tips in the right direction would be greatly appreciated. An explanation of how to do this would be divine. An explanation of why I can't do this would be met with a scowling acceptance and a thank-you.

For those who don't have a facebook, here are some pastebins. Anything else you need I'll try to supply

2 Answers
2

The "Like link" is a Javascript-backed element which invokes an AJAX call to the server. It carries a unique ID which is keyed off both the item being "liked" and the user who pulled down the page (in this case, you) to ensure duplicate "likes" are not accidentally submitted and the UI to become out of sync with the DB; and to ensure you can't "like" something on another user's behalf. The case you are describing is indiscernible from a malicious attempt at doing the same thing.

Can you just send them a message with a link to the friend's page and tell them to "Like" the status themselves?

Why not write a Facebook application and plug directly into your own profile. You could invite his friends to your application, which would allow them to support your friend's attempt to quit smoking without having to hack together a script that "clicks" the Like link. The hack could easily be considered malicious.

Interesting...this is kind of cool. Do facebook applications have to go through some sort of approval phase? Could this be something I could string together in a couple hours or would it turn into a project?
–
ChadApr 15 '09 at 20:30

@tharkun I'm looking at the getting started page for facebook developers and there doesn't appear to be an approval phase. What in particular would be so time consuming?
–
ChadApr 15 '09 at 20:44

I just don't think you'll get it together in a couple of hours but maybe I'm wrong. I checked that page a while ago. They don't speak about approval but I doubt they don't do any checks. But I thought more about the server env you need.
–
markusApr 15 '09 at 21:03