【问题标题】:Facebook like button doesn't remember "likes" (keeps resetting on refresh)Facebook 赞按钮不记得“赞”(刷新时不断重置)
【发布时间】:2011-12-10 16:37:14
【问题描述】:
我有一个应用程序,它可以为带有类似按钮的用户创建动态页面。
该按钮适用于所有页面,但是当我刷新页面时,其中一些页面不会“记住”点赞数(或者我在一秒钟前喜欢过该页面),而其他页面则完美无缺。
这是一个记住点赞数的页面示例:www.teespring.com/teespring
还有一个不起作用:www.teespring.com/brownrugby
【问题讨论】:
标签:
php
jquery
facebook
codeigniter
facebook-like
【解决方案2】:
如果您在单击“赞”按钮时监控网络流量,您可以向 Facebook 发出 XHR 请求,为用户创建“赞”。
您会看到,当您单击“赞”按钮时,Facebook 会发出此请求,并返回带有状态的 JSON 字符串。您的实际上失败了,这是返回响应的相关部分。
"payload":{"requires_login":false,
"error_info":{"brief":"App ID does not match domain",
"full":"The app ID specified within the \"fb:app_id\" meta tag is
not allowed on this domain. You must setup the Connect Base Domains
for your app to be a prefix of http:\/\/teespring.com\/brownrugby.","errorUri":"\/connect\/connect_to_node_error.php?
title=App+ID+does+not+match+domain&body=The+app+ID+specified+within+the+\u002522fb\u00253Aapp_id\u002522+meta+tag+is+not+allowed+on+this+domain.+You+must+setup+the+Connect+Base+Domains+for+your+app+to+be+a+prefix+of+http\u00253A\u00252F\u00252Fteespring.com\u00252Fbrownrugby.&hash=AQAacTBYi-g6Czel"},
从该回复看来,您的应用程序的域配置或打开的图形对象页面的应用程序 ID 配置似乎存在问题。
希望这对您有所帮助并为您指明正确的方向。