【发布时间】:2012-07-16 10:59:51
【问题描述】:
我创建了一个应用程序,一个对象(文章)一个动作(读取),我想测试发布,但我总是提交警报“发生错误”。为什么?
头代码
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/fb/article#">
<meta property="fb:app_id" content="xxxxxxxxxx" />
<meta property="og:type" content="article" />
<meta property="og:url" content="object_url" />
<meta property="og:title" content="Tachnomo" />
<meta property="og:description" content="Drive car" />
<meta property="og:image" content="https://s-static.ak.fbcdn.net/images/devsite/attachment_blank.png" />
和javascript
<script type="text/javascript">
function readnews()
{
FB.api(
'/me/news.reads?article=object_url',
'post',
function(response) {
if (!response || response.error) {
alert('Error occured');
} else {
alert('Drive was successfully published with ID : ' + response.id);
}
});
}
</script>
【问题讨论】:
-
什么错误?给我们一些可以合作的东西。
标签: php javascript facebook-graph-api facebook-opengraph