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 ing.
<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/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 ing...
"(#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 ??
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 ing.
<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/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 ing...
"(#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 ??
Share Improve this question edited Dec 18, 2014 at 12:41 Akash Mishra asked Dec 18, 2014 at 11:27 Akash MishraAkash Mishra 1893 silver badges16 bronze badges1 Answer
Reset to default 7No, there is no way to create Events with the API anymore.
Check out the following links:
- https://developers.facebook./docs/graph-api/reference/v2.2/page/events
- https://developers.facebook./docs/graph-api/reference/v2.2/user/events
You cannot create events via the Graph API.