当前位置: 动力学知识库 > 问答 > 编程问答 >

android - How to log into Facebook without the Facebook app?

问题描述:

I use a Facebook sample app (SessionLoginSample) to understand how to log into Facebook. My Facebook SDK is latest — version 3.0. When I have the Facebook app installed, I can log in without any problems.

The problem is when I uninstall my Facebook app and re-install the sample (so it doesn't log in automatically). I try to log in but I can see only a white empty dialog. The only option I have is to close it. Even if I wait 10-15 minutes, the dialog doesn't change.

I tried to debug the Facebook SDK but I couldn't find what's causing the error.

I tested this on LG-E610 (4.0.3) and HTC Sensation (4.0.3).

Is this facebook sdk error or I'm doing something wrong?

Edit: I tested this issue again 10 days later in the same coditions and everything seems to work as expected.

网友答案:

The problem might not be on your side! I have encountered a situation where one and the same request to Facebook would be answered as expected or with an "Internal Server Error 500" depending on my IP (IP/User agent to be exact).

You can be quite certain that nothing is wrong with your configuration and application when:

  1. Your app works from another network (i.e. another IP)
  2. When the sample app from Facebook (i.e. HelloFacebookSample) runs into the same problem.
    • For Android see: http://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/
    • For iOS see: http://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/

My suspicion is that Facebook puts certain IP/user agent combinations in a temporary black list. The problem is that their generic 500 response is not helpful.

For another reported case see my question at Facebook web login in android app stalls when using WiFi instead of 3G

分享给朋友:
您可能感兴趣的文章:
随机阅读: