Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating Facebook Event - Graph API

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?

like image 452
user601935 Avatar asked Jan 13 '14 22:01

user601935


People also ask

Is Facebook Graph API deprecated?

Applies to all versions. Facebook Analytics will no longer be available after June 30, 2021. Additionally, we are deprecating the App Dashboard Plugin for Marketing API. For more information visit the Business Help Center.

How do you make a Facebook graph?

Register as a Facebook Developer. A Facebook App – This app will be for testing so there is no need to involve your app code when creating this Facebook App. The Graph Explorer tool open in a separate browser window. A brief understanding of the structure of the Facebook Social Graph from our Graph API Overview guide.

Is Facebook Graph API a REST API?

The Legacy REST API is in the process of being deprecated, while the Graph API is the most current, so if you're unsure of which one to use, your best bet is to go with that one. As you suggested, the Graph API, just like the Legacy REST API, is in fact a RESTful API.


2 Answers

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

like image 164
rochal Avatar answered Sep 19 '22 14:09

rochal


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

like image 37
westonplatter Avatar answered Sep 20 '22 14:09

westonplatter