We have a new account and are trying to use the sample app as a test of the SDK vs native Facebook login functionality. We have a pair of Facebook applications we are testing with. I'm not sure how their settings differ, but here is the result with the two apps. (FB AppID 2 is the main one we're trying to use; I included AppID 1 just for troubleshooting/comparison purposes.)
FB AppID 1: Click on either SDK or Native login button and get a Facebook popup with the error: "Not logged in. You are not logged in. Please log in and try again."
FB AppID 2: Click on either SDK or Native login button and get a Facebook login popup asking user to log in to the application, with the correct application name. After successful login, I see a conversation like this in the Android debug logs:
:: --- HTTP PUT
https://[subdomain].api.oneall.com/users.json:: Content-Type: application/json; charset=UTF-8
:: Content-Length: 293
:: {"request":{"user":{"action":"import_from_access_token","identity":{"source":{"access_token":{"key":"[long access token here]"},"key":"facebook"}}}}}
:: --- END HTTP (293-byte body)
:: Not sending keepalive. Current connection state=STOPPED
:: --- HTTP 400
https://[subdomain].api.oneall.com/users.json (454ms)
:: : HTTP/1.1 400 Bad Request
:: {"response":{"request":{"date":"Thu, 14 Jul 2016 16:38:52 +0200","resource":"\/users.json","status":{"flag":"error","code":400,"info":"The provider did not accept the access_token, either the key\/secret combination is wrong or the token is expired."}}}}
:: --- END HTTP (254-byte body)
Nothing appears in the sample app's User Info box because of the failed provider call. I can successfully authenticate using Twitter and get back information about the user.
Is this an issue with the configuration of the FB application? Thanks for any help.
Answers
{"request":{"user":{"action":"import_from_access_token","identity":
{"source":{"access_token":{"key":"aaaaaaaa-aaaa-aaaa-bd93-9174e0ef7927"},"key":"facebook"}}}}}
I get back the same message about "The provider did not accept the access_token, either the key/secret combination is wrong or the token is expired." What am I missing?
The provider did not accept the access_token, either the key/secret combination is wrong or the token is expired.
If you get this error then it's very likely that you are authenticating the user with a Facebook app that is different from the app that you have entered in the Facebook setup in your OneAll account.
Could you please compare the Facebook app ID that you are using for authentication with the Facebook app ID in your OneAll account and make sure that they are the same?
https://[subdomain].api.oneall.com/socialize/connect/mobile/facebook/?nonce=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&callback_uri=http://localhost/callback
I go through the FB login process and get redirected here:
http://localhost/callback?oa_action=social_login&oa_connector=mobile&connection_token=aaaaaaaa-6808-4021-8216-417072514258#_=_
I then use that token to make the "import_from_access_token" API call, which returns the "did not accept the access_token" message. Is this not the right workflow for the web API?