我正在使用RestFb来获取特定关键字的帖子。我正在使用下面的代码来做同样的事情。
Connection<Post> publicSearch = facebookClient.fetchConnection("search",
Post.class, Parameter.with("q", "ferrari"),Parameter.with("type", "post"));
面临的错误是:
Exception in thread "main" com.restfb.exception.FacebookOAuthException:
Received Facebook error response of type OAuthException: An unknown error has
occurred. (code 1, subcode null) at
com.restfb.DefaultFacebookClient$DefaultGraphFacebookExceptionMapper.exceptionFo
rTypeAndMessage(DefaultFacebookClient.java:1196) at
com.restfb.DefaultFacebookClient.throwFacebookResponseStatusExceptionIfNecessary
(DefaultFacebookClient.java:1111) at
com.restfb.DefaultFacebookClient.makeRequestAndProcessResponse(DefaultFacebookCl
ient.java:1045) at
com.restfb.DefaultFacebookClient.makeRequest(DefaultFacebookClient.java:958) at
com.restfb.DefaultFacebookClient.makeRequest(DefaultFacebookClient.java:921) at
com.restfb.DefaultFacebookClient.fetchConnection(DefaultFacebookClient.java:378)
at com.XXXXXXXX.facebook.FacebookSource.main(FacebookSource.java:69)
答案 0 :(得分:0)
请参阅Graph API文档:
公共邮政搜索已不再可用。 (/搜索类型=交&安培; Q = foobar的)
该端点自推出超过一年以来已被弃用,自2015年5月1日起不再可用。