Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7790481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:35:59+00:00 2026-06-01T21:35:59+00:00

I have connected my app with facebook using spring social facebook api. I’ve tried

  • 0

I have connected my app with facebook using spring social facebook api. I’ve tried to fetch all groups using following way

FacebookTemplate facebookTemplate = new FacebookTemplate();     
List<Group> group = facebookTemplate.fetchConnections("me", "groups", Group.class);   

But it generates the following error message

    org.springframework.social.MissingAuthorizationException: Authorization is required for the operation, but the API binding was created without authorization.
    org.springframework.social.facebook.api.impl.FacebookErrorHandler.handleFacebookError(FacebookErrorHandler.java:95)
    org.springframework.social.facebook.api.impl.FacebookErrorHandler.handleError(FacebookErrorHandler.java:60)
    org.springframework.web.client.RestTemplate.handleResponseError(RestTemplate.java:486)
    org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:443)
    org.springframework.web.client.RestTemplate.execute(RestTemplate.java:415)
    org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:213)
    org.springframework.social.facebook.api.impl.FacebookTemplate.fetchConnections(FacebookTemplate.java:180)
    org.springframework.social.facebook.api.impl.FacebookTemplate.fetchConnections(FacebookTemplate.java:174)
    com.horoppa.social.facebook.FacebookFeedController.postUpdate(FacebookFeedController.java:52)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)

It may be required to create FacebookTemplate object using AccessToken for authorization. 
    FacebookTemplate facebookTemplate = new FacebookTemplate(AccessToken);

Please help me, how to get accessToken and how to fetch all groups.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T21:36:00+00:00Added an answer on June 1, 2026 at 9:36 pm

    It seems that you are using spring-social-showcase. So, you can fetch group list of current user by following way

     @Controller
    

    @RequestMapping(“/facebook/group”)
    public class FacebookGroupsController {

    private final Facebook facebook;
    
    @Inject
    public FacebookGroupsController(Facebook facebook) {
        this.facebook = facebook;
    }
    
    /*
     * Fetch all group list
     */
    @RequestMapping(value="/list", method=RequestMethod.GET)
    public String showGroup(Model model) {              
        List<Group> groupList = facebook.fetchConnections("me", "groups", Group.class);         
        model.addAttribute("group", groupList);         
        return "facebook/groupList";
    }
    

    }

    You could also found that the been already created for facebook in SocialConfig.java

    @Bean
    @Scope(value="request", proxyMode=ScopedProxyMode.INTERFACES)
    public Facebook facebook() {
        Connection<Facebook> facebook = connectionRepository().findPrimaryConnection(Facebook.class);
        return facebook != null ? facebook.getApi() : new FacebookTemplate();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an app which allows users to log in via Facebook, and all
I have a Facebook Connect app that I monetize using Google AdSense. I want
I have integrated the Facebook SDK in my app using the official facebook connect
I am trying to find a way to keep connected with the Facebook API
I have a Facebook app that is built as an iFrame. I am using
So I have an app account in which it can login using facebook/twitter or
I have an app which user can login using twitter and facebook to login,
I have an app that uses facebook connect. When it has to login to
I have Slider in my app that is connected to a few methods. In
Lets say I have my C# app installed on 2 laptops connected to a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.