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 7052835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:25:53+00:00 2026-05-28T03:25:53+00:00

It took me some time, but I managed to get to the last point

  • 0

It took me some time, but I managed to get to the last point in real time updates, the challenge.

I know that when subscribing Facebook should ping my server, the problem is that it never happens, I always get the same response back:

{“error”:{“type”:”OAuthException”,”message”:”(#2201) response does not match challenge, expected value = ‘1506372182’, received=””}}

It looks like it is able to connect to my server (every other callback url fails with address not available), however I don’t see it calling me in the logs.

I’m using app engine:

public void doGet(HttpServletRequest req, HttpServletResponse resp)
    throws IOException {
...

else if (parameters.containsKey("hub.mode")) {
            log.info("doing hub.mode");
            // Check that challenge is valid.
            if (parameters.get("hub_verify_token").equals(Constants.FACEBOOK_VERIFY_TOKEN)) {
                log.info("hub.mode test is valid");
                resp.setContentType("text/plain");
                resp.getWriter().print(req.getParameter("hub.challenge"));
            }

        }
...


// I want real time information on a specific user, on its feeds.
        String data = URLEncoder.encode("object", "UTF-8") + "="
                + URLEncoder.encode("user", "UTF-8");
        data += "&" + URLEncoder.encode("fields", "UTF-8") + "="
                + URLEncoder.encode("feed", "UTF-8");
        // Send real time updates to this URL.
        data += "&" + URLEncoder.encode("callback_url", "UTF-8") + "="
                + URLEncoder.encode(reconstructedURL.toString(), "UTF-8");
        // A token used to verify that it is actually me who is running the verification process.
        data += "&" + URLEncoder.encode("verify_token", "UTF-8") + "="
                + URLEncoder.encode(Constants.FACEBOOK_VERIFY_TOKEN, "UTF-8");
        data += "&"
                + URLEncoder.encode("access_token", "UTF-8")
                + "="
                +Constants.FACEBOOK_APP_CODE + "|"
                        + Constants.FACEBOOK_APP_SECRET;
        // Subscribe by doing a post.
        URL url = new URL(String.format(
                "https://graph.facebook.com/%s/subscriptions?access_token=%s",
                Constants.FACEBOOK_APP_CODE, accessToken));
        URLConnection conn = url.openConnection();
        conn.setDoOutput(true);
        conn.setDoInput(true);
        OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
        log.info(String.format("Sent the following data '%s'", data));
        wr.write(data);
        wr.flush();

I’m handling both the user authentication and real time subscription in the same servlet.

When reading back the response I’m getting the above error and I don’t see any call to my servlet (in the app engine logs).
I’m sure I’m missing something.

Any help will be appreciated.

  • 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-05-28T03:25:54+00:00Added an answer on May 28, 2026 at 3:25 am

    Ok, solved. The problem was with the permissions in web.xml, Facebook couldn’t reach my page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

it took me some time to find out that both Eclipse and Aptana get
I have a list of elements describing events that took place at some time,
OK, this is probably pretty basic stuff, but it took me quite some time
I encountered a problem that took me some time to debug where a plug-in
I know that very similar question was posted some time ago and it was
So a couple years back I took some time to grok make , and
It took me quite some time to understand the difference between an rvalue and
Some time ago we took over the responsibility of a legacy code base. One
It's been some time since I did any C/c++, but I wanted to write
Did you spot the difference in the title? (for me, it took some time)

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.