首先 - 我不相信这是一个重复的问题.我在SO上搜索了相同或类似的问题,并且由于问题之前的故障排除的性质,我相信这个问题是独一无二的.
Facebook无法掌握我的og:image文件,我尝试了所有常用的解决方案.我开始认为它可能与某些事情有关https://...
og:image"中链接的图像,但它们显示为空白.然而,当我们点击图像时,它们确实存在并且它们对它们是直接的.og:image向元添加另一个时,FB的linter会找到并读取它.它会显示预览.预览为空白.我们得到的唯一例外是本网站上没有的图片.cpanel或.htaccess阻止图像出现,所以我们检查.这没有.我们甚至< img src="[remote file]" >在一个完全不同的服务器上做了快速,图像显示正常.og:type另一个元标记的另一个奇怪之处.我们删除了所有这些,一次一个并检查它.没变.只是警告.og:image关闭任何或image_src,FB找不到任何图像.我在绳子尽头.如果我说自己和别人花了多少时间在这上面,你会感到震惊.问题是这是一个在线商店.我们绝对,肯定不能有图像.我们必须.我们有十个左右的其他网站......这是唯一有og:image问题的网站.它也是唯一一个https,所以我们认为这可能是问题所在.但我们无法在网络上的任何地方找到任何先例.
这些是元标记:
<meta property="og:title" content="[The product name]" />
<meta property="og:description" content="[the product description]" />
<meta property="og:image" content="https://www.[ourwebsite].com/images/shirts/overdriven-blues-music-tshirt-details-black.png" />
<meta property="og:image" content="https://www.[ourwebsite].com/images/shirts/overdriven-blues-music-tshirt-art-black.png" />
<meta property="og:image" content="http://www.[ADIFFERENTwebsite].com/wp-content/uploads/2011/06/ARS-Header-Shine2.png" />
<meta property="og:image" content="https://www.[ourwebsite].com/images/ARShopHeader.png" /> …Run Code Online (Sandbox Code Playgroud) facebook opengraph facebook-graph-api open-graph-protocol facebook-opengraph
有像Facebook和缓存og:图像的问题.
长话短说:Facebook已经缓存了我们喜欢的图像的旧版本.元内容网址无法更改.有什么我可以做的刷新吗?
长话:我正在研究的网站上有一个og:meta图像,Facebook在页面被喜欢时使用.此元标记在整个网站的所有网页上使用相同的图片网址.图像只是网站的品牌形象.
问题是该网站最近更新了他们的品牌,我们无法让Facebook像图像更新.当用户点击类似链接时,生成的Facebook帖子仍会显示旧的品牌形象.
元标记类似于:
<meta property="og:image" content="http://[domain].com/images/bookmark/apple-touch-icon.png"/>
Run Code Online (Sandbox Code Playgroud)
每当一个人进入Facebook时,图像的URL就会变为缓存的Facebook URL,类似于:
http://external.ak.fbcdn.net/safe_image.php?d=AQDajxm-qgVNdfEL&w=90&h=90&url=http%3A%2F%2F[domain].com%2Fimages%2Fbookmark%2Fapple-touch-icon.png
Run Code Online (Sandbox Code Playgroud)
此URL显示网站品牌的旧版本.它已经过了一个多星期,还没有更新.
有没有办法强迫Facebook重新索引图像/清除它的缓存?或者,Facebook会定期自动执行此操作吗?我找不到任何相关的信息.
我知道更改元标记中的URL可以解决问题,但元标记是由跨多个网站使用的代码生成的,无法更改.我也尝试过其他人建议的delinter工具.没运气.
我的脚本有这样的代码
echo '<p class="wdfb_login_button"><fb:login-button scope="' .
Wdfb_Permissions::get_permissions() . '" redirect-url="' .
wdfb_get_login_redirect() . '">' .
__("Login with Facebook", 'wdfb') . '</fb:login-button></p>';
Run Code Online (Sandbox Code Playgroud)
它使用facebook的默认登录按钮插件.但我想使用我的自定义facebook连接图像.谁能帮我?
我在我的控制台中收到此消息
FB.getLoginStatus() called before calling FB.init().
Run Code Online (Sandbox Code Playgroud)
我的代码
<div id="fb-root"></div>
<script>
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = \"//connect.facebook.net/fr_FR/all.js#xfbml=1\";
ref.parentNode.insertBefore(js, ref);
}(document));
</script>
<div class="fb-like" data-send="false" data-layout="button_count" data-width="100" data-show-faces="false"></div>
Run Code Online (Sandbox Code Playgroud)
我不明白为什么.在我的所有网站上,我只有一个关于这个facebook的插件.
我正在努力获得Facebook登录工作的注册流程.这是一个简单的例子:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<title>My Facebook Login Page</title>
</head>
<body>
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>
<div id="fb-root"></div>
<script type="text/javascript">
FB.init({
appId:'xxxxxxxxxxx',
cookie:true,
status:true,
xfbml:true,
channelUrl : 'http://<myWebSite>/channel.html',
oauth:true
});
</script>
<fb:login-button registration-url="http://<myWebSite>/register"/>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
(我上面替换的唯一内容是网站和appID)
如果我这样尝试,登录按钮会显示,但点击它会导致FireBug在浏览器日志中报告"未知状态:未定义".如果我删除'oauth = true'行,它会起作用.我正在努力遵守新的oauth 2.0标准,所以我想把它留进去.还有其他人遇到过吗?看起来如果这是一个bug,它很早就会被捕获.
我正在尝试在我的网站上使用新的Facebook Graph API.这就是我所拥有的:
在页面的某个地方:
<fb:login-button autologoutlink="true" perms="email,user_birthday,status_update,publish_stream"></fb:login-button>
Run Code Online (Sandbox Code Playgroud)
标签后面:
<div id="fb-root">
</div>
<script type="text/javascript">
window.fbAsyncInit = function () {
FB.init({ appId: '<%= ConfigurationManager.AppSettings["FBAppId"] %>', status: true, cookie: true, xfbml: true });
/* All the events registered */
FB.Event.subscribe('auth.login', function (response) {
// do something with response
alert("login success");
});
FB.Event.subscribe('auth.logout', function (response) {
// do something with response
alert("logout success");
});
FB.getLoginStatus(function (response) {
if (response.session) {
// logged in and connected user, someone you know
alert("login success");
}
});
}; …Run Code Online (Sandbox Code Playgroud) 我想允许我的网络应用程序的用户能够从一个页面(main_page)将多个对象发布到他们的时间轴.
我已经存储了用户的访问令牌.
我试图提交的页面上的标签,网址是page_url:
<meta property="fb:app_id" content="my_app_id" />
<meta property="og:type" content="my_namespace:my_object" />
<meta property="og:title" content="some string" />
<meta property="og:description" content="some other string" />
<meta property="og:image" content="some_image_url" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="page_url" />
Run Code Online (Sandbox Code Playgroud)
Rails代码提交从main_page触发的url:
begin
fb_post = RestClient.post 'https://graph.facebook.com/me/my_namespace:do', :access_token=>user.get_facebook_auth_token, :my_object=>"page_url"
rescue StandardError => e
p 'e.response is'
p e.response
end
Run Code Online (Sandbox Code Playgroud)
产量
2011-11-02T02:42:14+00:00 app[web.1]: "e.response is"
2011-11-02T02:42:14+00:00 app[web.1]: "{\"error\":{\"message\":\"(#3502) Object at URL page_url has og:type of 'website'. The property 'my_object' requires an object of og:type 'my_namespace:my_object'.\",\"type\":\"OAuthException\"}}"
Run Code Online (Sandbox Code Playgroud)
真正奇怪的是,在收到此错误后,如果我在对象调试器上测试page_url …
我目前遇到了Facebook的实时API问题.
我希望订阅用户个人资料中的一些内容,包括他们在音乐,书籍,电视和电影类别中的"喜欢".
当我通过FQL和Graph查询时,我得到了正确的信息,但是当这些条目在用户配置文件上发生更改时,Facebook没有ping我的通知端点.
订阅和验证都很好.以下是来自我的App的Facebook的有效订阅:
["object"]=> string(4) "user"
["callback_url"]=> <correct callback URL>/facebook/update/"
["fields"]=>array(11) {
[0]=> string(13) "birthday_date"
[1]=> string(5) "books"
[2]=> string(10) "first_name"
[3]=> string(7) "friends"
[4]=> string(5) "likes"
[5]=> string(6) "movies"
[6]=> string(5) "music"
[7]=> string(4) "name"
[8]=> string(3) "sex"
[9]=> string(2) "tv"
[10]=> string(8) "username"
}
["active"]=> bool(true)
Run Code Online (Sandbox Code Playgroud)
起初我没有订阅,likes但补充说,看看它是否解决了问题......它没有.
该文件说:
以下是您可以订阅的用户连接列表:供稿,朋友,活动,兴趣,音乐,书籍,电影,电视,喜欢,签到
我得到通知,当任何数据变化(包括friends),这仅仅是music,books,movies和television.
也许更奇怪的是,当我"喜欢"一个随机的Facebook页面(即使用类似按钮,而不是将其添加到我的个人资料中的字段)时,我会在该like字段上触发通知.当我不像同一页上,我得到的通知触发likes,music,books,movies和television! …
好吧,我是facebook api的新手,最近有人告诉我,我正在使用旧api.
所以现在,我似乎无法弄清楚如何检查用户是否使用新的api登录我的网站.
我真正拥有的只是
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({appId: '(appid)', status: true, cookie: true, xfbml: true});
FB.Event.subscribe('auth.sessionChange', function(response) {
if (response.session) {
// A user has logged in, and a new cookie has been saved
} else {
// The user has logged out, and the cookie has been cleared
}
});
</script>
Run Code Online (Sandbox Code Playgroud)
和一个登录按钮.
如果有人可以告诉我如何检查某人是否登录,(或者它是否正确?)因为我希望它更改位于div中的登录按钮
<div id="fbuser">
欢迎用户.
或者即使你可以指向我一些有用的教程,那也很棒!
谢谢
我正在尝试在我的网站上添加Facebook Like Box社交插件(我从官方文档中获取了代码).
它工作正常,但只有我登录Facebook; 如果不是它只是显示
Facebook公开个人资料登录以查看此内容
我真的不明白这个问题,因为在其他网站上我建的一切都很好.
我在想这可能是一个页面设置.这是我<iframe>喜欢的Box的代码:
<iframe src="http://www.facebook.com/plugins/likebox.php?id=1331391XXXXXXXX&width=298&connections=10&stream=false&header=true" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:298px; height:290px">
Run Code Online (Sandbox Code Playgroud)