You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.
Try to post message on facebook. Use for start this link http://docs.spring.io/spring-social-facebook/docs/3.0.x/reference/htmlsingle/#posting-to-and-reading-feeds
Use this code for simple test (before register myapp on developers.facebook, get valid token)
String appId = "1507175062679391";
String appSecret = "281a84481098cab1500277915caa6c76";
OAuth2Operations oauth = new FacebookConnectionFactory(appId, appSecret).getOAuthOperations();
String appToken = oauth.authenticateClient().getAccessToken();
Facebook facebook = new FacebookTemplate(appToken);
facebook.feedOperations().updateStatus("I'm trying out Spring Social!");
Have next stack trace (exception on the last line code)
14-Aug-2017 10:12:00.252 SEVERE [http-nio-8080-exec-2] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [mvc-dispatcher] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.social.ResourceNotFoundException: An active access token must be used to query information about the current user.] with root cause
org.springframework.social.ResourceNotFoundException: An active access token must be used to query information about the current user.
Spring version: 4.3.7; social-core: 1.1.4.RELEASE; spring-social-facebook: 2.0.3.RELEASE
Can someone explain what i missed?
The text was updated successfully, but these errors were encountered:
Hi @Aurusd, First of all currently update status operation from the application is forbidden. You can read the only user public information like 'user name' ext. An error from Facebook means that you must specify userId instead of using default "me" userId which used in method updateStatus . For example:
Where i can get example code for post something on my facebook page with using spring-social? Or at least can you give some resource where i can find it?
Try to post message on facebook. Use for start this link http://docs.spring.io/spring-social-facebook/docs/3.0.x/reference/htmlsingle/#posting-to-and-reading-feeds
Use this code for simple test (before register myapp on developers.facebook, get valid token)
String appId = "1507175062679391";
String appSecret = "281a84481098cab1500277915caa6c76";
OAuth2Operations oauth = new FacebookConnectionFactory(appId, appSecret).getOAuthOperations();
String appToken = oauth.authenticateClient().getAccessToken();
Facebook facebook = new FacebookTemplate(appToken);
facebook.feedOperations().updateStatus("I'm trying out Spring Social!");
Have next stack trace (exception on the last line code)
14-Aug-2017 10:12:00.252 SEVERE [http-nio-8080-exec-2] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [mvc-dispatcher] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.social.ResourceNotFoundException: An active access token must be used to query information about the current user.] with root cause
org.springframework.social.ResourceNotFoundException: An active access token must be used to query information about the current user.
Spring version: 4.3.7; social-core: 1.1.4.RELEASE; spring-social-facebook: 2.0.3.RELEASE
Can someone explain what i missed?
The text was updated successfully, but these errors were encountered: