Announcement Announcement Module
Collapse
No announcement yet.
Technical question: running facebookTemplate behind a proxy Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Were you setting "proxyHost" and "proxyPort" ? Or "http.proxyHost" and "http.proxyPort"? I recall that it is the latter that works.

    Comment


    • #3
      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?

      Comment


      • #4
        I also found this interesting related post.

        At least I am not alone

        Comment


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

          Comment

          Working...
          X