开发者

How do I make a fallback for Facebook Facepile Social Plugin?

开发者 https://www.devze.com 2023-03-27 04:42 出处:网络
How would I go about creating a content fallback if the user is not logged into Facebook or does not have any 开发者_开发技巧friends who \"Liked\" my website? The problem I am experiencing is if the a

How would I go about creating a content fallback if the user is not logged into Facebook or does not have any 开发者_开发技巧friends who "Liked" my website? The problem I am experiencing is if the above requirements are not met, I get a blank spot on my site where the Facepile plugin would ordinarily show up.


You can use FB.getLoginStatus in the JS SDK to see if the person is logged into Facebook and connected to your site.

You can use FB.api to call /me/likes to see if the current user liked your site and then conditionally hide/show different elements on the page in JavaScript.

0

精彩评论

暂无评论...
验证码 换一张
取 消