Welcome to WebmasterWorld Guest from 54.204.162.36

Forum Moderators: coopster & jatar k

Facebook Like button visibility control

hide Like button if visitor is not a Facebook member

   
8:40 am on Jun 14, 2010 (gmt 0)

5+ Year Member



Hello,

I have successfully embed a Facebook Like button to my ecommerce website.
Visitors can click Like on each product and a link is posted on their facebook's profile page.

What i want is to control the visibility of the button...
For ex. If the visitor does not have a facebook cookie (i'm not sure which cookie determines that the visitors is a facebook member), i don't want the Like button to appear.

Any ideas on how to do that?

Thanks.
9:47 am on Jun 14, 2010 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Hi there nimonogy,

You need a conditional clause, once you know the name of the cookie you just say something like:-
If(cookie is set){
//Show button
}

No need for an else clause as you only need the condition to evaluate true if cookie set.

Cheers
MRb
4:45 pm on Jun 14, 2010 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



If the visitor does not have a facebook cookie


Security policy of browsers will not allow you to read a cookie set by another site. This can't be done (and if there's a way, it's only a "black hat" way.) Imagine what would happen if I could read all the cookies in your browser from my web site. Well not me, but . . . yeah.
4:39 am on Jun 15, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If it is possible at all, the place to find the answer would be the facebook developer forums.
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month