Looking over the spring social facebook api, EventOperations offers
createEvent(java.lang.String name, java.lang.String startTime,
java.lang.String endTime)
to post Events to facebook.
Is there a way to post more information for the event, like event image and event description?
Looking at
createEventmethod, it does not currently support the attachment (event image). It does however call into GraphApipublishto actually publish the event:graphApi.publish(…) itself ( which is implemented in FacebookTemplate ) would support anything as a {key,value} pair that Facebook is ready to accept, as it just delegates to the RestTemplate, and feeds all the {key,value} pairs to Facebook through a regular HTTP POST:Hence you can extend the EventTemplate and add another
createEventmethod, that would take animage nameand animage file path, and would added it as an additional {key,value} to adataMultiMap:Hence the method would look close to:
This of course does not include any possible validation that you might want to do, etc..
Once you have this working, which seems to be pretty straightforward, you can donate / contribute it back to Spring Social => they’d be very pleased 🙂