有没有办法通过 API 创建 facebook 事件,因为图形 API 不再可用

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

本文关键字:API 因为 图形 不再 事件 facebook 创建 有没有      更新时间:2023-09-26

我想使用 API 创建 Facebook 事件。我知道图形 API 不再可用于发布事件。

我也尝试了Javascript SDK和PHP SDK,但收到相同的错误消息。

有没有办法通过Javascript API创建Facebook Event。

以下是我在jquery中使用的代码,但错误即将到来。

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

但是这个错误来了...

"(#12( 事件管理 API 在版本 v2.0 及更高版本中已弃用">

我正在搜索goolge,但没有任何方法可以创建fb事件。

有什么办法吗??

不,无法再使用 API 创建事件。

查看以下链接:

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

无法通过图形 API 创建事件。