此操作的权限不足。在Spring Boot应用程序中在Facebook上发布帖子的例外

时间:2019-05-28 12:45:06

标签: spring-boot facebook-graph-api spring-social-facebook

我如何使用Spring Boot应用程序在Facebook feed或个人资料上发布状态。当我尝试获取此操作的权限不足时。

@RequestMapping(value="/feed")
public String postUpdate() {
     String message="nithesh did it";
        if (connectionRepository.findPrimaryConnection(Facebook.class) == null) {
               System.out.println("this is called bhai");
                return "redirect:/connect/facebook";
            }
    facebook.feedOperations().updateStatus(message);
    return "redirect:/facebook/feed";
}

}

spring.social.facebook.appId = 3644175441888

spring.social.facebook.appSecret = 8717a7cf0559fe25d4fbf77b6b spring.social.facebook.app-id = 364417544182188

spring.social.facebook.app-secret = 8717a7cf0559fe25d4fbf75b6b security.oauth2.client.client-id = 9714510965739

security.oauth2.client.access-token-uri = https://graph.facebook.com/oauth/access_token

security.oauth2.client.user-authorization-uri = https://www.facebook.com/dialog/oauth security.oauth2.client.token-name = 691ea94a97282ce16dc35ad23bf security.oauth2.resource.user-info-uri = https://graph.facebook.com/me

security.oauth2.client.authentication-scheme =查询

security.oauth2.client.client-authentication-scheme = form

0 个答案:

没有答案