0

I have already running Facebook login and then Faceook strikes with security questions and asked us to enable require app secret and until they limited our app and we were not able to login. Now we enabled the app secret but upon login they are sending an error message

{
  "error": {
    "message": "API calls from the server require an appsecret_proof argument",
    "type": "GraphMethodException",
    "code": 100,
    "fbtrace_id": "APM.........."
   }
}

I am sending this API to grant for the permission

FB.api('/me?fields=name,email,first_name,last_name,gender', function(response) {

How do I send the appsecret_proof here in jquery? Also let me know that if I am only using login facility, so I need to enable the require app secret?

2
  • The app secret - clue in the name there - must never be exposed in publicly available code. And calculating the proof needs that secret ... so doing this on the client side is simply a big NO to begin with. The documentation also explicitly says that this is for server-side API calls only. "I am sending this API to grant for the permission" - that is not requesting any permissions, it is requesting the user details.
    – CBroe
    Commented Apr 4, 2023 at 5:51
  • 1
    I can't tell why they would think a request made using the JS SDK's FB.api was server-side to begin with. But the app-secret proof thing should not be relevant here, if using the JS SDK is all you are doing, and there are no server-side API calls involved.
    – CBroe
    Commented Apr 4, 2023 at 5:53

0

Browse other questions tagged or ask your own question.