kalyanhadooptraining / facebook-java-api

Automatically exported from code.google.com/p/facebook-java-api
1 stars 0 forks source link

com.google.code.facebookapi.FacebookException: Invalid parameter #360

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
hello everyone
I I get this message when I execute a login facebook from my desktop java 
application. the error just the last line
[code]
propertiesManager = new PropertiesFileManager();    
        client = new FacebookJaxbRestClient(propertiesManager.getProperty("api_key"), propertiesManager.getProperty("secret"));
        client.setIsDesktop(true); 
        String token = client.auth_createToken();

        HttpClient http = new HttpClient();
                   http.setParams(new HttpClientParams());
                   http.setState(new HttpState());

        GetMethod get = new GetMethod(propertiesManager.getProperty("login_url")+"?api_key=" + propertiesManager.getProperty("api_key")+ "&v=1.0&auth_token=" + token);
        http.executeMethod(get);
        PostMethod post = new PostMethod(propertiesManager.getProperty("login_url"));
                    post.addParameter(new NameValuePair("api_key", propertiesManager.getProperty("api_key")));
                    post.addParameter(new NameValuePair("v", "1.0"));
                    post.addParameter(new NameValuePair("auth_token", token));
                    post.addParameter(new NameValuePair("email",login));
                    post.addParameter(new NameValuePair("pass", password));

        http.executeMethod(post);
        // fetch session key

        session = client.auth_getSession(token);
[/code]

What is the expected output? What do you see instead?
com.google.code.facebookapi.FacebookException: Invalid parameter
    at com.google.code.facebookapi.FacebookJaxbRestClient.parseCallResult(FacebookJaxbRestClient.java:362)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:518)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:440)
    at com.google.code.facebookapi.FacebookJaxbRestClient.auth_getSession(FacebookJaxbRestClient.java:324)

My application is a Java applet that I excute on my pc then I'll put it in a 
web page

API : facebook-java-api-3.0.1 System Windows 7

Original issue reported on code.google.com by souhail....@gmail.com on 21 Mar 2012 at 2:33