Creating Facebook Event - Graph API

2019-01-12 03:44发布

I have gotten the access token with the correct permissions to manage events etc. However, the following:

https://graph.facebook.com/{pageID}/events?access_token=xxxx&name%3Dtest%26description%3Dtest%2520description

(I have not included the credentials here)

Upon testing the above does not create a name value or description for the event - the page just returns a blank data object.

Is it possible to create some test data for an event through the browser address bar and if so what is the correct syntax?

2条回答
唯我独甜
2楼-- · 2019-01-12 03:57

I spent a long time battling this too.

TL;DR - graph v1.0 allows event creation, graph v2.0 does not.

Facebook Graph API 1.0 "events" allows you to create events (all CRUD actions) and is fully described in the docs. Graph version 2.0 does not allow you to CRUD event data. This is where the other answer came from.

Graph version 1.0 will be depricated April 30, 2015 (official changelog).

查看更多
The star\"
3楼-- · 2019-01-12 04:14

As per Facebook's documentation in: https://developers.facebook.com/docs/graph-api/reference/v2.0/event#publish

Publishing

You cannot create events via the Graph API.

Use Facebook SDK instead: https://developers.facebook.com/docs/javascript/reference/FB.api

查看更多
登录 后发表回答