Extract description of an event

81 views
Skip to first unread message

Juan Ramón Ríos Fernández

unread,
May 16, 2013, 3:57:59 PM5/16/13
to res...@googlegroups.com
In my code to put e.description return null
The event description and other methods work without problems, for example e.name


Below my code:

----------------------------------------

 public String getDescripcionEvent(String token, String nombreEvento) {
       
        String result = null;
       
        FacebookClient facebookClient = new DefaultFacebookClient(token);

       
        Connection<Event> myEvents = facebookClient.fetchConnection("me/events", Event.class);
       
        for (Event e : myEvents.getData()) {
          
             if(e.getName().equals(nombreEvento)){

                result = e.getDescription();
               
            }   
        }
       

        return result;
    }

---------------------------------------------------------------

thanks!!!!!

Marcel Stör

unread,
May 16, 2013, 4:01:27 PM5/16/13
to res...@googlegroups.com
What do you get if you try 'me/events' with the Graph API explorer[1]?
How is it different from the JSON you get with RestFB?

Cheers,
Marcel

[1] http://developers.facebook.com/tools/explorer
> --
> You received this message because you are subscribed to the Google
> Groups "RestFB" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to restfb+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>


--
Marcel Stör, http://frightanic.com
Couchsurfing: http://www.couchsurfing.com/people/marcelstoer
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

Juan Ramón Ríos Fernández

unread,
May 19, 2013, 9:32:20 AM5/19/13
to res...@googlegroups.com
solved
simply

Connection <Event> facebookClient.fetchConnection myEventDescription = ("me / events", Event.class, Parameter.with ("Fields", "name, description"));
Reply all
Reply to author
Forward
0 new messages