开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜