-1

I'm trying to get a user's facebook calendar events. I added the permission user_events, and this is the request I use -

var request = FBSDKGraphRequest(graphPath:"/me/events", parameters: nil);

    request.startWithCompletionHandler { (connection : FBSDKGraphRequestConnection!, result : AnyObject!, error : NSError!) -> Void in
        if error == nil {
            println(result["data"]!)
        } else {
            println("Error Getting Friends \(error)");
        }
    }

This code doesn't return anything, can you help me fix it?

Thanks!

EDIT

When I checked my upcoming events list it was empty, the data I need is the birthdays in the events/calendar.

Omer
  • 221
  • 3
  • 13
  • _“the data I need is the birthdays in the events/calendar”_ – those are not actually events, and therefor you can’t get them via `/me/events`. (And not via any other endpoint either.) – CBroe Jul 03 '15 at 11:54
  • Is there another way to get facebook friends birthdays? – Omer Jul 03 '15 at 11:57
  • There is no way to get all friends birthdays. And, even if it was, are you sure the world needs the 1000th birthday app? – Tobi Jul 03 '15 at 11:58
  • facebook reminds you about friend birthdays anyway ;) – andyrandy Jul 03 '15 at 12:25
  • _“Is there another way to get facebook friends birthdays?”_ – only for friends that have logged in to the app as well, and granted permission to access their birthday. – CBroe Jul 03 '15 at 17:38

1 Answers1

0

Have you requested the user_events permission upon Login? I guess not...

Tobi
  • 31,405
  • 8
  • 58
  • 90