我想通过我的应用程序向我的朋友发送 Facebook 通知。我通过restfb库使用了以下通知api
facebookClient = new DefaultFacebookClient(vAccessTokenDetails.getVAccessToken());
String app_access_token = facebookClient.obtainAppAccessToken("485626xxxxxx614","d9428570ef5ae82609b6xxxxxxxb").getAccessToken();
publishMessageResponse = facebookClient.publish(post.getVFriendId()+"/notifications?access_token="+app_access_token, FacebookType.class, Parameter.with("template", post.getVMessage()), Parameter.with("href", " http://www.wiinkURL.com ")); vPostId = publishMessageResponse.getId();
但我得到 com.restfb.exception.FacebookOAuthException: Received Facebook error response of type OAuthException: (#15) This method must be called with an app access_token