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.
When trying to post as a Page admin I get the following error:
(#100) Tried accessing nonexisting field (accounts) on node type (Page)
My code is:
String accessToken = ... ; // the page access token
String pageId = ...; // the page id
Facebook facebook = new FacebookTemplate(accessToken);
PageOperations pageOperations = facebook.pageOperations();
PagePostData pagePostData = new PagePostData(pageId);
pagePostData.link("http://www.mysite.com/mypage", null, null, null, null);
pageOperations.post(pagePostData);
The stack trace is:
org.springframework.social.UncategorizedApiException: (#100) Tried accessing nonexisting field (accounts) on node type (Page)
at org.springframework.social.facebook.api.impl.FacebookErrorHandler.handleFacebookError(FacebookErrorHandler.java:91) ~[FacebookErrorHandler.class:2.0.1.RELEASE]
at org.springframework.social.facebook.api.impl.FacebookErrorHandler.handleError(FacebookErrorHandler.java:59) ~[FacebookErrorHandler.class:2.0.1.RELEASE]
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:614) ~[RestTemplate.class:4.1.6.RELEASE]
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:570) ~[RestTemplate.class:4.1.6.RELEASE]
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:545) ~[RestTemplate.class:4.1.6.RELEASE]
at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:253) ~[RestTemplate.class:4.1.6.RELEASE]
at org.springframework.social.facebook.api.impl.FacebookTemplate.fetchConnections(FacebookTemplate.java:229) ~[FacebookTemplate.class:2.0.1.RELEASE]
at org.springframework.social.facebook.api.impl.FacebookTemplate.fetchConnections(FacebookTemplate.java:223) ~[FacebookTemplate.class:2.0.1.RELEASE]
at org.springframework.social.facebook.api.impl.PageTemplate.getAccounts(PageTemplate.java:61) ~[PageTemplate.class:2.0.1.RELEASE]
at org.springframework.social.facebook.api.impl.PageTemplate.getAccount(PageTemplate.java:125) ~[PageTemplate.class:2.0.1.RELEASE]
at org.springframework.social.facebook.api.impl.PageTemplate.getAccessToken(PageTemplate.java:115) ~[PageTemplate.class:2.0.1.RELEASE]
at org.springframework.social.facebook.api.impl.PageTemplate.post(PageTemplate.java:77) ~[PageTemplate.class:2.0.1.RELEASE]
the library is trying to get the account details using a page token, which is not a permitted operation.
I guess it should skip this step, which is needed when posting as the user (with a user access token), if the access token is a PAGE access token.
The text was updated successfully, but these errors were encountered:
Using
spring-social-facebook-2.0.1.RELEASE.jar
When trying to post as a Page admin I get the following error:
My code is:
The stack trace is:
The log:
My take:
the library is trying to get the account details using a page token, which is not a permitted operation.
I guess it should skip this step, which is needed when posting as the user (with a user access token), if the access token is a PAGE access token.
The text was updated successfully, but these errors were encountered: