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

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:
Your app works from another network (i.e. another IP)
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 Internal Server 500 from Facebook with sepcific IP/user-agent combination

Related

Error When Logging on Facebook/Firebase on Android

I am making an application that uses Facebook login, the App is on development and i am trying it on my personal smartphone (a Xiaomi). Im using a test user provided by Facebook to log in, but nothing happens, when i try to log the app says something like:
Log in error. There was an error signing into this app. Try again later
I don't know which can be the issue. When i try to do the same on the emulator it works. (it opens Chrome to Log in, in my phone it opens the Facebook App (maybe thats the problem?)
The emulator returns this as result.accessToken:
TOKN: {AccessToken token:ACCESS_TOKEN_REMOVED permissions:[user_likes, openid, public_profile, user_friends, email]}
And it shows the profile on the Authentication tab in Firebase (so it actually works). I dont know why is not working in a real device.
This are some screenshots of the app: Log Button,
Profile Selection Screen (Test Profile),
Error Message.
I dont think is a coding problem, because as i said before works fine on emulator. I have added everything on my manifest, and i implement all the libraries needed.
Like the following lines:
Manifest Code
(PD: i tried A LOT to paste the code, but this page was sending me the same error all the time, and the indentation was correct, im new so i was suffering a little with this, sorry!)
I solve it by myself, i was using the app in development mode, that means that i need to put a hash for every device im using to develop, when i run the command on my computer it gives me the hash of my computer, i used the signing report of android studio on my Smart phone, it gives me other hash, then i put it on facebook and voilá, it works now.

Getting a USER_CANCELLED token error while trying to authenticate using Apple MusicKit SDK

I'm trying to interface the Apple Musickit SDK to my android app. I was able to get the authentication working initially. But I'm getting a USER_CANCELLED token error on my phone/device every time I try to connect. I'm getting the same error now while trying to authenticate on the example sdk_test app(even though it was working earlier) that is shipped with the SDK, What's fishy is that the code runs fine on other phones except mine now(using the same dev token too). Can someone please help me out with this?
This was a bug, and has been fixed in latest apple music app relese.
Updating apple music to the latest release solves this issue.

Login using Facebook SDK for Unity3d on android always sends old AccessToken

I'm using the 5.1 SDK to log in on Android. This works first time round and I'm able to download profile pics and use the API with no issues.
When I restart the app, I'm prompted with the permissions screen again, even though I already given permissions.
When I look at the device log, I see
{"key_hash":"XXXXXXXXXXXXXX=\n","user_id":"1234","expiration_timestamp":"1404234168","access_token":XXXXX...","opened":true}
(values replaced with XXXXX for privacy)
This expiration_timestamp is parsed to be "07/01/2014 17:02:48", which is wrong.
Every time I restart the app, I get the same permissions prompt.
Have I made an error with the setup or is this a known issue? Anybody know any workarounds?
Thanks all

Facebook login on unity android app problems

I am testing an android app I created in Unity on my Galaxy S4 and I successfully log in, and everything works great! However, while changing no settings, I test my app on a Moto X device, and when I click login button and accept permission request. Nothing happens, and I do not log in.
Is their something specific I need to provide to handle different android devices to successfully use the facebook sdk?
Any tips or help is greatly appreciated!!
It should work regardless of the device
Just make sure you are asking for read only permissions during FB login (e.g. email permission)... after successfully getting the read permission then you should be able to ask for write permissions such as uploading photos...etc
switch to development build and see what the android console log show? you should at least get some errors

Setting up and debugging android installation tracking with facebook SDK

We are following this guide on setting up adverts with the Facebook SDK on android.
https://www.facebook-studio.com/fbassets/resource/71/MobileAppInstallAds_ProductSetupGuide.pdf
There is a line in there that tells you to add the following to your app:
Facebook fb=new Facebook(appId);
fb.publishInstall(appContext)
However looking through the Facebook SDK code, it appears to send this off automatically when you call authorize (via the autoPublishAsync method).
As we are calling authorize, and it calls through to publishInstall, we have assumed this extra call isn't needed. (Could someone confirm this?)
We have everything working on iOS, which is reporting installs perfectly. However, we aren't seeing as many android installs coming through as we would expect (though we are seeing some - implying it is working to some extent).
While debugging the app, the publishInstall method is called and sends the install to facebook, but the response from that method isn't parsed or validated at all. So presumably it could be failing in production for some reason and we'd never know.
Is there a page somewhere to just view android installs to validate that it is all working correctly on FB's side? Or does anyone have any other suggestions about what might be going wrong, or how to debug this?
Calling Facebook.authorize will transitively also call publishInstall. However, unless you call Facebook.authorize for every user (rather than just when they click on a login button), you may not cover all cases.
You should also update to the new 3.0.1 version of the Android SDK (released last week), which does better response handling/caching for publishInstall requests.

Categories

Resources