-1

我知道之前已经以各种方式对此进行了介绍 - 但是有没有办法在页面上为喜欢的用户显示一组内容,为不喜欢的用户显示另一组内容。

这种方法(http://www.uksitebuilder.net/2011/05/create-facebook-secret-fan-page/)似乎只在您第一次点击应用程序时有效,因此不利于回访。

我一直在谷歌搜索,但很难找到最新/当前的解决方案。

任何帮助将不胜感激。

4

1 回答 1

1

It's all in the docs. Simply parse the signed request in your Tab and read out the page.liked property. It's true if the user liked the page and false if not.

Edit_: After seeing your comment, just save the "liked" state in a session variable. You should then use the JavaScript methods provided by Facebook to check if the user liked the page while browsing around in your App. You could then reload the page for example. You can read about FB.Event.subscribe in the Facebook JavaScript SDK docs.

于 2012-06-20T12:36:56.217 回答