Facebook like page Count

How can i count a Facebook like page Count in my rails application and
need to save that in my db.

or need to know :fb_like => 'true' Or false

Or how it can be Done by Ajax OR something else please suggest

"a Facebook like page Count" what do you mean?

fan count of an facebook page

fan count of an facebook page

Do you want an actual Facebook Fan count? If so, there's API methods in Facebook's developer site that you can use directly. Or if you're building your own "Fan" implementation within your site, I would imagine you could simply count the clicks of the Fan button in a separate Fan model, and do a polymorphic association with your various models. Add a counter cache to each 'Fanned' model for speed.

Walter

This is in no way a Rails question, but here's a short answer anyway:

1. Get the ID or vanity ID of the page you're interested in. (Ex:
"40796308305" or "cocacola")
2. GET http://graph.facebook.com/<ID>
3. You will receive a JSON object. Within that object, there is a
"fan_count".

For an example, take a look at http://graph.facebook.com/cocacola

If you want more help, you'll need to either find the right mailing
list or figure out how this question relates to Rails.