views:

1004

answers:

3

I am trying to create an event using Facebooks api. (From a django app) Has anyone created an event with the new graph api?

A: 

There appears to be no documented method for creating an API in the new docs, but you can use the REST interface methods as described here: http://developers.facebook.com/docs/reference/rest/ .

The big show stopper for me at the moment is the requirement of a user session to run any of the REST interfaces. A lot of my requests to Facebook (Event creations, invites) do not run during an active Facebook user logged in. They need to be created from the Application. I'm not sure as of yet if this is a limitation in the new API or just not implemented in the SDKs.

Peter Brooks
+2  A: 

If you require access to user data while the user is not online, there is the offline_access extended privilege which gives you a longer lived session key. This can be used to perform updates while the user is offline.

While I can't help you with Django, most of the Graph API does seem to work for me (not tried events unfortunately) but just seems badly documented.

DarkFlib
I'm aware of the offline_access permission session solution. The big problem is knowing if I can create an event. It appears that the api will not allow it. It appears the only write access to the Graph API is really rsvp/comments/like and not much else.
kkubasik
+1  A: 

Check here: http://developers.facebook.com/docs/api#publishing

Make a POST call to /PROFILE_ID/events with the required informations. Unfortunately they don't have all the possible arguments listed, but they can be found in the REST API docs under Events.create (can't post link apparently).

Ronni Egeriis
Ok, let me try this out. Looks like exactly what I wanted too see! Thanks so much! Any chance you know the encoding details on the image upload?
kkubasik