Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ??

like image 283
Akash Mishra Avatar asked Dec 18 '14 11:12

Akash Mishra


1 Answers

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

Check out the following links:

  • https://developers.facebook.com/docs/graph-api/reference/v2.2/page/events
  • https://developers.facebook.com/docs/graph-api/reference/v2.2/user/events

You cannot create events via the Graph API.

like image 177
andyrandy Avatar answered Oct 06 '22 23:10

andyrandy