Facebook login is currently unavailable - facebook-login

I'm setting up a 'Login with Facebook' button and have it on a test page. http://www.digitalinkmultimedia.com/my-account
I believe I have things set up correctly for the app at developers.facebook.com. The app says it's public and available. I'm using Business Catalyst as the CRM, and the facebook integration appears to be correct (App ID, App Secret, etc)
When I click the login with facebook button the first time I get the message about my profile info being shared....but when I continue I get a 'Facebook login is currently unavailable'.
One thing I noticed is that when the popup first loads the FBTOKEN parameter has a number in it, then it quickly changes to FBUTOKEN=00000000-0000-0000-0000-000000000000#=
Any suggestions would be appreciated.

In the Facebook developers console for your app, please go to App Review > Permission Feature and give Advanced Access for "public_profile" and "email".
Facebook Login of the iOS app is working well without the Advanced Access setting.

If you're experiencing this now (end of 2020) it might be due to a pending "Data Checkup":
As part of an ongoing effort to protect user data and drive long-term value for developers, Facebook has introduced an annual Data Use Checkup for app admins to certify that their API access and data use comply with Facebook Platform Terms and Developer Policies, together with all other applicable terms and policies.
Enter https://developers.facebook.com/apps and you should see your app in red color with a note that Data Checkup is due.
You'll need to spend a few minutes to fill in a simple form...
After you're done you should be good 👍🏼

https://developers.facebook.com/apps
https://developers.facebook.com/apps/395514758911597/fb-login/settings/
Get Advanced Access
I agree that any data I receive through public_profile will be used in accordance with the allowed usage.
download open ssl and paste in E drive create folder software--------
and extract here openssl
keytool -exportcert -alias androiddebugkey -keystore "C:\Users\USERNAME.android\debug.keystore" | "PATH_TO_OPENSSL_LIBRARY\bin\openssl" sha1 -binary | "PATH_TO_OPENSSL_LIBRARY\bin\openssl" base64
keytool -exportcert -alias androiddebugkey -keystore %USERPROFILE%.android\debug.keystore | D:\FbDependentSoftware\bin\openssl sha1 -binary | D:\FbDependentSoftware\bin\openssl base64
D:\FbDependentSoftware
password :- android
8Rc05yVGh4n4xVIx4lkfCYYrzrM=

For me #NajamUsSaqib's comment worked, tried getting advance Access for Email and Public Profile and it started working.

If anyone is still facing this issue. Please check in your developer account if you have a pending Data use Checkup.
Once you complete it, it should work.

I had the same problem and got fixed the following way:
Site Settings>Social Integration
on the field where it says "Enter Site URL of your Facebook application" make sure you have your address as follow:
http://www.example.com not http://www.example.com**/**
Basically it will not connect to your FB App if you have a " / " after your domain.

I have got the same issue.
Check the setup is done or not. If not then review all the points that need to add the data
make sure add icons and url properly
make sure add domain
make sure you have ask for the permissions that you need
add platform and hashkey for android correctly
Most important thing you need to work in live mode
After all the above setup you will get the success
Developers please go through with the latest doc there is a-lot of changes in doc while integrating the facebook login or graph api or instagram api's.

Related

How to change settings of my app using Google Ads API so that refresh token doesn't expire?

I made a script using Google Ads API to get reports from Google Ads. But the refresh token expires every 7 days. I found out that it happens because the app should be published (have publishing status "In production" instead of "Testing"). So I did it.
But then the Verification status changed to "Needs verification".
An option "Prepare for verification" appears
If I try to "Prepare for verification" than it requires to authorize domain of my app.
So this is an option for cases when someone wants to make an app for multiple users.
But it's not my case, I just get reports from my own Google Ads account.
I found out that probably the problem could be solved if I change User type of my app from "External" to "Internal". But it seems that it only an option for Google Workspace users.
But as I see on their site it is not free.
I am sure there should be some free option how to do this. Everything else works fine, the problem is just the refresh token expiration. Maybe I missed something, please help.
There is, just set it to test and add yourself as a user.

Issue when trying to register an app for consent screen in google oauth

I am trying to register my app for Oauth consent screen, so that I can create a OAuth client ID. I keep getting this validation error at end of the form, even though I have submitted everything correctly.
An error occurred while saving your app
And this error does not state which input in the form is invalid. Also in the network tab of development tools window, everytime I submit the request, I can see a POST request being initiated and it fails with following error.
{"error":{"code":3,"message":"The request failed because one of the field of the resource is invalid.","details":[{"#type":"type.googleapis.com/google.rpc.PreconditionFailure","violations":[{"type":"client_auth_config","subject":"?error_code=9&error_field_name=UpdateBrandWithMaskRequest.brand_id&error_field_value=0"}]}]}}.
Any suggestions on how to fix this is highly appreciated. I have contacted the google support about this issue as well, but as of now they're saying everything works on their end and clear cache and cookies but it doesn't work. I have attached here a capture of consent config wizard I'm using as well.
Put the Project ID in App Name
Try adding your support email to Firebase console. Go to firebase console->settings->General->Support Email->Add Email. Now while creating oAuth consent screen add same email id developer contact information as well as support email. It worked for me.
To expand on the top answer, there are numerous underlying reasons why this step of the app registration would fail. In the case where the application name is not valid (fails any of the checks that Google Cloud Platform enforces), then setting the application name to the project ID is guaranteed to fix the problem, as the project ID will always happen to be a valid application name.
It may be worth digging into the underlying validation error, which can be achieved by inspecting the network request that is sent upon submitting the form. In the "Network" tab of the Developer Tools, select the POST request that is captured after clicking the "SAVE AND CONTINUE" button. The "Response" tab (shown below for my case) should display an error object with a more descriptive message.
In my case, it seems that the application name was deemed abusive:
The request has been classified as abusive and was not allowed to proceed.
which I suspect is because it contains the word "Google".
What #Kalind said helped me to resolve the problem.
So login to firebase console, chose the project you are trying to create an OAuth Consent too. And then click settings-> General-> Support Email-> Add Email from dropdown.
Now when I go back to google cloud console under the Oauth consent screen, I can see that I have one registered to that project.
I had the same problem, indeed your App name must be identical to your Project ID that you chose when creating the project
I got the exact same error, probably an issue on their end :/
Thanks for reporting this everyone. I've also had the same problem for different apps and #Kalind suggestion fixes the problem. On Firebase project's settings there's a new field now called "Support email" where you can select your support email address. This will fix your issue like #Kalind and #Kasper said. I'm just adding a screenshot to make it more clear for those with the same problem.
Thanks!
For me there was an email in there already (owner of account email).
I had to invite another email > accept invite > change email > save > then change back > then I could proceed with the OAuth Consent Screen.
To change the support email on the Firebase Console you go to:
https://console.firebase.google.com/ > select Cog > Project Settings > General tab > Support Email
I reached this page is because of testing Google Login.
I faced this issue creating "OAuth consent screen".
But I didn't need this to create.
Just go to "Domain verification" page and "Add Domain".
There you may need to add 'txt record' in DNS Setting to prove you owned the domain.
After adding domain, go to "Credentials" page.
It is ready to choose the "Application type" like google guide
!!! pls enjoy !!!
I used the app Id as my App Name in the OAuth consent screen setup page.
If you are trying to use group email from gsuite in App consent/Firebase support, you must be the group owner, and do not need that group email address on any IAM role.
I believe the name of the application requesting access simply needs to be different from the name of the Google project.
This Error was come due to the project name is the same as the app name. So your app name and project name must be differnet
to expand on the helpful post of #zr0gravity7
I checked the 'response' in the developer con{"error":
{"code":3,"message":"com.google.apps.framework.request.BadRequestException:
At least one field must be updated."}}
I simply changed one field, and the save now succeeded.
(This is a very disappointing design of the form error checking)
The app name must be unique across Google. Modify the app name a bit.

create page programmatically for a test user

Can I create via api pages for a test users?
This is what I did:
Given my app, I got the user's token from app dashboard test users and I tried to use it in the graph explorer (POST /user_id/accounts).
I've the error "(#10) Application does not have permission for this action".
These are the permission the app has been granted for: manage_pages, publish_pages, publish_actions
Do I miss some permission or it is not possible?
Luca
[Edited following Simon's advice and the response below:]
I've been looking into this all day and it seems the answer is a solid, "Nope."
According to the developer documentation on creating pages, the {user_id}/accounts endpoint only supports Reading, not Creating, Updating, or Deleting.
Although apparently if you apply for Standard API access, you can receive permissions to create pages. (Only available if your app is generating ad revenue.)
Googling, reading and trying, I figure out that we can create a page via api.
https://developers.facebook.com/docs/graph-api/reference/page/#Creating Applications with Standard API Access can create Pages through the API using the following paths: /{user_id}/accounts
So the answer to my question is yes, if your application has the Standard API Access, no matter if you are dealing with test users or not. Note that teh call is slow (about 5 sec.)
That's it.

Unable to get ad insights in Facebook's Marketing API

As described in the marketing API, I have registered an app got my app key and and id, generated a token with ads permissions, list pages permission as well. The app is not yet submitted for approval.
When I try to get the list of ad accountsz linked to 'me' it returns the array of all ad accounts.
But when I select any of the business accounts (other than my personal Facebook account) and try to retrieve the ads insights API throws exception saying:
but when I try to get the insights, using the python SDK, I get the same error, ex: (#273) This Ads API call requires the user to be admin of the ad account. User is not admin on ad account .
What is surprising is when I use the similar sample page from Facebook-Developers to get insights, it is able to retrieve the ads data for the same account, with my own login itself.
Why would my app be unable to do so?
Is there any such limitation for apps not reviewed?
Update: I seem to have admin access to the ad account as well. Here are some screenshots. (Unless its my dumb day I think something else is going on, but its my fist time with an API like this, so I cant be sure!;) )
Screenshots: GraphAPI Explrer with API call, App Settings, AdAccount Settings
Based on the discussion on question and experience I now have:
API user needs to be an admin of the ad account and of the app if you
wish to use the API.
The ad account needs to be specifically added to the app, in app settings. In developer access an app can only have access to a maximum of 5 ad accounts.
Error messages in Facebook API are misleading more often than not. Fix anything marked in yellow or red anywhere in the portal, to be
sure.
Do read about limits of every API before you use it, all API have different limits and your application design needs to take those into account.
As for the question, yes the issue was the text in red, as pointed out by #CBroe, although the error message was off by a mile and issue occurred only when using our own app.

different versions of facebook for location based development?

I am working on an app that uses facebook's check in feature from mobile phones. I have created multiple versions of the app on facebook so that i can keep production, test and development separated. All good. However, all my checkins whether test or dev or prod are going to the live facebook platform leading to check ins like "this is a test" or "blah blah" on live facebook pages. Is there a way to be able to check in but not on these real/live pages? In other words, is there a sandbox or development version where developers can freely update content?
Thanks you guys!
Best,
Sachin
So, as with many other things in life, banging my head against the problem helped a bit. I found out that I can create test users for my app - upto 500 of them. The documentation is at http://developers.facebook.com/docs/test_users/. I was able to create test users for my app, login to facebook with those test users and verify that my actions did not show up on public pages. Phew, now i need to deface these public property no more. :-) When doing this, you need to use the app access token not the regular user accesss token. To get that, follow this link: https://developers.facebook.com/docs/authentication/applications/. The last gotcha I faced was that the second link above states that you should have a parameter named grant_type=client_credentials in your graph request. I kept looking for types of client credentials that i could substitute what i thought was a place holder named "client_credentials". That term needs to go in verbatim. (GOTCHA). Also, twice when I tried to create a user, facebook responded with an error json saying that an "unknown error has occured". I was almost ready to give up... but like i said before, banging head against the problem helps. Facebook responded with a json like so after the third request:
{
"id":"*******1832",
"access_token":"*****",
"login_url":"https://www.facebook.com/platform/test_account_login.php?user_id=*****&n=*****",
"email":"****",
"password":"*****"
}
Hope this helps someone else who might also be looking for this info.