events.create() retruns Invalid Parameter exception

Feb 7, 2009 at 7:15 AM
The events.create method is returning an invalid parameter exception when being called. Here is how I have written the code:

 

Dim uid As Long = CType(Session("Facebook_userId"), Long)
Dim events As New Facebook.events(fApi)
Dim StartDt As New DateTime(2009, 2, 12, 10, 30, 0, DateTimeKind.Local)
Dim EndDt As New DateTime(2009, 2, 16, 10, 30, 0, DateTimeKind.Local)
Dim NewEvent As New Facebook.Schema.facebookevent()
NewEvent.name =
"ThroughCode"
NewEvent.event_type = "Party" 'Also tried value as "1"
NewEvent.event_subtype = "Benefit" ' Also tried value as "1"
NewEvent.host = "tony"
NewEvent.location = "Sabha"
NewEvent.start_date = StartDt.Date
NewEvent.start_time = 10
NewEvent.end_date = EndDt.DateNewEvent.end_time = 10
NewEvent.description = "SDFSDF"

 

 

Dim CreateEvtStatus As Long = events.create(NewEvent) 'Exception occurs here