JamesG
JamesG

Reputation: 2018

Facebook web app... can I change something on my own website in response to a user "liking" my app?

I want a sorta basic answer on this one, just a little guidance but nothing fancy... I just want to know what direction to go in to make it so I update a specific users account (on my personal database) in response to the user clicking the facebook "like" button on my site.

So.. if someone was registered on my site, but not yet clicked FACEBOOK LIKE through my site, when they clicked it can I edit my database, specifically the entry of the user who clicked like?

Hope that makes sense?

Thanks

Upvotes: 0

Views: 182

Answers (1)

Chris Sobolewski
Chris Sobolewski

Reputation: 12955

About as close as you can get is if you call the method for /USER_ID/likes/PAGE_ID the facebook API will return either an empty array, or some data on the page. An empty array means they have not liked it.

That will tell you if they like your facebook page, not necessarily your URL.

Here is a SO answer with some javascript/css black magic for if you really need to know if a user likes a particular URL or not.

Facebook how to check if user has liked page and show content?

Upvotes: 1

Related Questions