This is my current code to request permission to view email and user_photos
'Req_perms' = & gt; 'Email, user_photo', When a user is offline, I have to use the user's photo, I have to remember that this was possible, but maybe I am wrong. Anyway, if this is possible, how is it done?
Hyunmin (in comments) is the correct link.
As a very quick summary:
- Log in user as normal; You will get an entry token. It can be a short life or long lasting (60 day) token - depending on the admission method that it is server-side or client-side (PHP or JS), but do not worry what you get.
- Concerned: You can also check termination if you want to be given an access token, then it is provided in the form of termination. But I leave this step again.
-
In one day you can raise the token back in 60 days. Just call
?
client_id = APP_ID & amp; Client_secret = APP_SECRET & amp; Grant_type = fb_exchange_token & amp; Fb_exchange_token = EXISTING_ACCESS_TOKEN
and you can get an access token back (maybe it may or may not be). Just use / store this old access token.
Actually really simple - besides keeping an eye on updating "daily per day" once daily (and for now you can ignore it and call multiple times if needed - just a few
In response to the comment - "How do you tell the URL that gives you a token?"
You do not redirect the user Because it is for you, whose response value is needed, etc. So you have to call him and handle him.
The easiest (but not recommended)
$ response = file_get_contents ($ url) to test in PHP; But you should curl on the production system (as some production systems do not allow file_gate_content for external URLs) for a curl example either Google, or you were included The Facebook SDK libraries can tap into the makeRequest () function.
Comments
Post a Comment