Facebook App Re- asking Permission using php sdk

558 views Asked by At

In my case

  1. User Choose option of facebook login
  2. redirect to facebook if Not Login - ask for username / password
  3. then ask for Permission to share Data
  4. if agreed Redirect to our site by taking Users Public Data ---------- Done
  5. if user cancel Redirect to cancel redirect URL ----------------------------- Exit

if in 3rd step User don't wants to share his Email then my next step is ----- Directly alert him/her or Redirect to ( error OOP's Page because email not exit )

but again next time now User wants to share data But , Facebook is Not asking to user about permission window so in this case i need help How can i Prompt user window each time to user

I am using Graph Api for Facebook Loginenter image description here

1

There are 1 answers

2
CBroe On

First of all, not every user has an e-mail address on file with Facebook (f.e. when they signed up using only their mobile) - so your app should be prepared for a scenario where there simply is no e-mail to get in the first place.

To re-ask for an already declined permission, you need to add the parameter auth_type=rerequest to your login dialog call.

The PHP SDK provides a special method getReRequestUrl for this purpose. (Which does basically the same as the getLoginUrl method, only adding this additional parameter.)