有没有办法通过API创建Facebook事件,因为图形API不再可用 [英] Is there any way to create facebook event via API as graph api is no longer available
问题描述
我想使用API创建Facebook事件。我知道Graph API不再可用于发布事件。
I want to create Facebook Event using API. I got to know that Graph API is no longer available to publish event.
我还尝试了JavaScript SDK和PHP SDK,但收到相同的错误消息。
I also tried Javascript SDK and PHP SDK but getting same error message.
有没有办法通过Javascript API创建Facebook事件。
Is there any way to create Facebook Event via Javascript API.
以下是我在jquery中使用的代码,但是错误即将到来。
Following is the code I am using in jquery but error is coming.
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '1517079011880399',
xfbml : true,
version : 'v2.1'
});
};
(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/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
function test(){
FB.login(function(){
FB.api('/me/events','post',{name:"JS-SDK Event",start_time:1272718027,location:"Beirut"},function(resp) {
console.log(resp);
alert(resp.id);
});
}, {scope: 'publish_actions'});
}
</script>
但是这个错误来了...
But this error is coming...
(#12)版本v2.0及更高版本已弃用事件管理API
我正在搜索goolge但没有获得任何方式创建fb事件。
I am searching over goolge but not getting any way to create fb event.
有没有办法?
推荐答案
不,没有办法用API创建活动。
No, there is no way to create Events with the API anymore.
查看以下链接:
- https://developers.facebook.com/docs/graph-api/reference/v2.2/page/events
- https://developers.facebook.com/docs/graph-api/reference/v2.2/user/events
您不能通过Graph API创建事件。
You cannot create events via the Graph API.
这篇关于有没有办法通过API创建Facebook事件,因为图形API不再可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!