Facebook oauth resolves URL and parameter settings

Facebook provides some documentation on oauth login options.

OAuth 2 Login Dialog

Options:

  • client_id = your application id
  • redirect_uri = URL of your website for your application
  • display = page, popup, iframe, async, touch. How to display login.
  • scope = permission names. The permissions that your application requests from the user for your application.
  • state = string included in the response back to your application.
  • response_type = code or token, or both. It is used differently depending on the authorization flow.

Is there more information about the different types of oauth functions and the parameters that come with it?

I need information on how to structure the url for oauth . I know a couple of configurations. For example:

 https://www.facebook.com/dialog/oauth? client_id=YourAppID &redirect_uri=The URL that you designated in your App Settings for your App &response_type=token //Whether you want a `code` returned, or a `token` returned, or both &scope=publish_stream // scope prompts the user for the type of permissions being asked for 

I saw a discussion that showed this:

 https://graph.facebook.com/oauth/authorize? client_id=123456789 &redirect_uri=http://example.com/ &scope=publish_stream,share_item,offline_access,manage_pages 

Note the difference in URLs:

 /dialog/oauth? 

or

 /oauth/authorize? 

What does authorize do? Does it grant GRANT permissions instead of ASKING for permissions? Where is the documentation on this subject?

+7
facebook facebook-oauth oauth facebook-graph-api
source share
1 answer

https://graph.facebook.com/oauth/authorize is also registered in a person - like authenticating a person and getting permission from a person, whether to get access to the requested permissions through the application.

oauth / authorize is a call to the api chart. I think the big difference could be that if you want to create a login stream manually, you should use / oauth / authorize .. else if you use the javascript / Apps api provided by facbook, it uses / dialog / oauth. Typically, applications need to confirm that the answer from the Login dialog box was from the same person who launched it. If you use the Facebook JavaScript SDK, it automatically performs these checks, so nothing is required, assuming that you are only making calls from the browser. Moreover, we can make encryption of api calls secure using appsecret_proof.

+1
source share

All Articles