0

I am trying to get used with Facebook API, restfb, but I have an annoying problem that is keep persisting. The code looks as follows:

FacebookClient fc = new DefaultFacebookClient(TOKEN, Version.VERSION_2_0);
User user = fc.fetchObject("me", User.class);
System.out.println(user.getName());

The method "fetchObject" exists in DefaultFacebookClient as follows:

public <T> T fetchObject(String object, Class<T> objectType, Parameter... parameters)

But Eclipse throws a compiling error saying:

The method fetchObject(String, Class, Parameter[]) in the type FacebookClient is not applicable for the arguments (String, Class<T>)

Any ideas what could be the problem?

0 Answers0