Results 1 to 5 of 5

Thread: Technical question: running facebookTemplate behind a proxy

  1. #1

    Default Technical question: running facebookTemplate behind a proxy

    Hello,

    I am using spring-social on tomcat and am facing the problem that I run my application on my local machine which is behind my company's firewall and when I try to do a publish on facebookTemplate, I get a timeout.

    If I take the URL from the trace, the URL is working. So I believe it is a proxy setting issue.

    Looking at the source code for spring-social, I see that FacebookTemplate relies on RestTemplate (spring web) which itself relies on Apache httpclient.

    I tried to setup proxy settings in the system properties (proxyHost, proxyPort, etc.) but no luck.

    Any help would be appreciated.

    Thank you
    Ludovic

  2. #2
    Join Date
    Aug 2004
    Posts
    1,099

    Default

    Were you setting "proxyHost" and "proxyPort" ? Or "http.proxyHost" and "http.proxyPort"? I recall that it is the latter that works.
    Craig Walls
    Spring Social Project Lead

  3. #3

    Question

    Yes I tried that too. I actually tried a lot of combinations.

    I have found this Link on the appache site where it indicates a way to do it:

    Code:
      HttpClient httpclient = new HttpClient();
      httpclient.getHostConfiguration().setProxy("myproxyhost", 8080);
      httpclient.getState().setProxyCredentials("my-proxy-realm", " myproxyhost",
      new UsernamePasswordCredentials("my-proxy-username", "my-proxy-password"));
      GetMethod httpget = new GetMethod("https://www.verisign.com/");
      try { 
        httpclient.executeMethod(httpget);
        System.out.println(httpget.getStatusLine());
      } finally {
        httpget.releaseConnection();
      }
    I'd like to try this but it is not possible to access httpclient easily.

    Does someone have tried to access facebook behind a proxy?

  4. #4

    Default

    I also found this interesting related post.

    At least I am not alone

  5. #5
    Join Date
    Nov 2010
    Posts
    1

    Default

    It is Hosting problem. I will suggest that you should shift your website hosting. In may opinion Host Gater is best.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •