Facebook 保存按钮:Post 失败 (404)
Facebook Save Button: Post failed (404)
有没有人遇到同样的问题?
我从 https://developers.facebook.com/docs/plugins/save?locale=en_US
得到了例子
按下 "Save-Button" 后,我从 Facebook 收到了成功消息,但没有添加任何内容。控制台显示以下错误。
错误:
POST: Failed to load resource: the server responded with a status of 404 ()
https://www.facebook.com/plugins/save/sentry/?dpr=1
代码:
<html>
<head>
<title>Your Website Title</title>
<meta property="og:url" content="https://www.instagram.com/facebook/" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Your Website Title" />
<style>
.fb-save, span, iframe {
width: 200px !important;
height: 50px !important;
}
</style>
</head>
<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/de_DE/sdk.js#xfbml=1&version=v2.6";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-save" data-uri="https://www.instagram.com/facebook/" data-size="large"></div>
</body>
</html>
好的,我找到问题了!我错过了 App-Id....
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5&appId=12345679";
或
window.fbAsyncInit = function() {
FB.init({
appId : 'your-app-id',
xfbml : true,
version : 'v2.5'
});
};
有没有人遇到同样的问题?
我从 https://developers.facebook.com/docs/plugins/save?locale=en_US
得到了例子按下 "Save-Button" 后,我从 Facebook 收到了成功消息,但没有添加任何内容。控制台显示以下错误。
错误:
POST: Failed to load resource: the server responded with a status of 404 ()
https://www.facebook.com/plugins/save/sentry/?dpr=1
代码:
<html>
<head>
<title>Your Website Title</title>
<meta property="og:url" content="https://www.instagram.com/facebook/" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Your Website Title" />
<style>
.fb-save, span, iframe {
width: 200px !important;
height: 50px !important;
}
</style>
</head>
<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/de_DE/sdk.js#xfbml=1&version=v2.6";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-save" data-uri="https://www.instagram.com/facebook/" data-size="large"></div>
</body>
</html>
好的,我找到问题了!我错过了 App-Id....
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5&appId=12345679";
或
window.fbAsyncInit = function() {
FB.init({
appId : 'your-app-id',
xfbml : true,
version : 'v2.5'
});
};