lotusbandsoft / facebook-java-api

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

RANDOMLY - Facebook authentication for desktop applciaitons fails ... #252

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I am using the library version 2.1.1.
Mine is a Facebook desktop type of application.

I am attempting to perform a login using the GET and POST attempts to login 
a user to Facebook and get a session key to perform further actions such as 
posting his message on the wall etc.

This piece of code used to work flawlessly earlier, however it has started 
failing randomly since a couple of weeks.

I have got a feeling that there are some changes to the Login.php of 
Facebook platform that is causing the issue.
Are there any other updates or any other users facing this issue?

Here is the code snippet ...

            ...
            ...
            ...

            fbUrl = "http://www.facebook.com/login.php?";
            IFacebookRestClient client = new FacebookJaxbRestClient(
                    fbApiKey,
                    fbSecretKey);
            String token = client.auth_createToken();
            HttpClient http = new HttpClient();

            String szConnectionURL = fbUrl + 
                   + "api_key=" + fbApiKey + "&v=1.0&auth_token=" + token;
            GetMethod get = new GetMethod(szConnectionURL);
            http.executeMethod(get);

            //String szNonUserIdEnc = getNonUserIdEnc(get);

            PostMethod post = new PostMethod(fbUrl);
            post.addParameter(new NameValuePair("api_key", fbApiKey));
            post.addParameter(new NameValuePair("v", "1.0"));
            post.addParameter(new NameValuePair("auth_token", token));
            post.addParameter(new NameValuePair("email",userId));
            post.addParameter(new NameValuePair("pass", password));
            http.executeMethod(post);

            String sessionId = client.auth_getSession(token);
            logger.debug("Session id:" + sessionId);

            ...
            ...
            ...

Original issue reported on code.google.com by amit.na...@gmail.com on 9 Oct 2009 at 4:43

GoogleCodeExporter commented 9 years ago
Seams like I have similar problem. The results are random. I also have a 
problem with
the Facebook not recognizing my app as a Desktop, although I set it up as one.

Original comment by ygl...@gmail.com on 23 Oct 2009 at 4:04

GoogleCodeExporter commented 9 years ago
I have the problem too. have any suggestion ? thanks.

Original comment by thanh.ki...@gmail.com on 27 Oct 2009 at 6:32

GoogleCodeExporter commented 9 years ago
I have this problem as well. Are you still seeing the same issue? Do you know 
of any
workaround?

Original comment by kumara...@gmail.com on 28 Oct 2009 at 11:58

GoogleCodeExporter commented 9 years ago
I have the same problem. The POST method return a 200 code... is this the wrong
behaviour? In my application happen when i try with continuous login; could it 
be a
defence strategy against DoS attacks?

Original comment by giovanni...@gmail.com on 2 Nov 2009 at 9:55

GoogleCodeExporter commented 9 years ago
I have similiar problem. Sometime  i get response 200 on post method. When I 
print
the response body i get this "Cookies required". FYI, I have been send all 
cookies.
This is 2.1.1 API bug or facebook bug or defence strategy against DoS attacks?
Anybody have experience upgrading API to 3.xx version? 

Original comment by muftimas...@gmail.com on 5 Nov 2009 at 12:13

GoogleCodeExporter commented 9 years ago
Hi,
we have the same problem. With experienced the same behavior. With a call to the
logout this happen less frequently. We experiment that with a login every 5 
minutes
(and a logout) we don't have problems.
Other experiences?

Original comment by giovanni...@gmail.com on 5 Nov 2009 at 9:33

GoogleCodeExporter commented 9 years ago
I have the same problem . I found some cause but no solution . The facebook 
IP(Ip 
resolved through www.facebook.com) is changed continuously . From one IP it 
always 
return response code as 302 and from other IPs it returns response code 200. It 
means when request hit One successful IP(Ip that return response code as 302) 
it 
behave like Desktop application,while for others it behave as a web application.

I have no solution . If some one have any solution please suggest.  

Original comment by sumittya...@gmail.com on 9 Nov 2009 at 6:56

GoogleCodeExporter commented 9 years ago
I have the same problem too. I have identified through the successful logged in 
that
 lsd(within cookie) is always same at GET and POST responded meanwhile the fail
logged  is always different... 

Any clue and solution???

Original comment by naubi...@gmail.com on 11 Nov 2009 at 11:27

GoogleCodeExporter commented 9 years ago
need the solution as well, if some one laredy have the solution for this 
problem,
please post here :((

Original comment by muftimas...@gmail.com on 19 Nov 2009 at 5:39

GoogleCodeExporter commented 9 years ago
Does anyone know how to resolve this issue ? Thanks

Original comment by lmy22...@163.com on 3 Dec 2009 at 5:53

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I am facing the same problem. Any solution??

Original comment by adnanmem...@gmail.com on 15 Feb 2010 at 3:34