Akash Mishra Akash Mishra - 1 month ago 18
Javascript Question

Is there any way to create facebook event via API as graph api is no longer available

I want to create Facebook Event using API. I got to know that Graph API is no longer available to publish event.

I also tried Javascript SDK and PHP SDK but getting same error message.

Is there any way to create Facebook Event via Javascript API.

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) events management API is deprecated for versions v2.0 and higher"

I am searching over goolge but not getting any way to create fb event.

Is there any way or not ??

Answer

No, there is no way to create Events with the API anymore.

Check out the following links:

You cannot create events via the Graph API.