2

I am trying to integrate https://oauth.io/ into my application. Below is the code for facebook integration that I am using:

 OAuth.popup('facebook')
            .done(function (result) {
                alert('sucess');
            })
            .fail(function (error) {
                alert('fail');
            });

Note: I am calling the above part of code in a button click.

In JQuery ready function I am calling OAuth.initialize("my_public_key");

When I click on the button I am getting "The parameter app_id is required" error in the popup. (added image of it)

enter image description here

Can someone let me know If I am missing something.

G_S
  • 7,068
  • 2
  • 21
  • 51
  • check app_id in your https://oauth.io/ configuration setting. – Asif Mushtaq Jul 28 '15 at 17:59
  • Sorry to ask... But I am not seeing any config file for oauth. Can you let me know if this is something that we should be adding?? – G_S Jul 28 '15 at 18:07
  • https://oauth.io/ is third party? then you must add your app_id in https://oauth.io/ configuration setting. – Asif Mushtaq Jul 28 '15 at 18:08
  • Yes its a third party. I have used https://oauth.io/home site. I just took oauth.js file that they asked to include. – G_S Jul 28 '15 at 18:13

1 Answers1

2

You must Integrate APIs in OAuth, follow the below method.

  1. Login to your account.
  2. Then click on the Integrated APIs menu from the left side bar.
  3. Now click on ADD APIs green button on the right top corner.
  4. Now Search and select Facebook.
  5. Now add the Keys and Permission Scope details and others.
Asif Mushtaq
  • 3,658
  • 4
  • 44
  • 80
  • I am seeing clientId, client_Secret and scope there. What are these? Can you help me regarding them? – G_S Jul 28 '15 at 18:27
  • Click here to see where to get your keys on Facebook: ? click on `?` you will find. – Asif Mushtaq Jul 28 '15 at 18:29
  • I got the required keys but still I am facing some error while opening popup. I am getting 'Given URL is not allowed by the Application configuration.....' message. I am using http://localhost:17136/ and have the 'site URL' of facebook. – G_S Jul 28 '15 at 18:46
  • Go to Facebook Application setting and add there website url. as in this image. https://oauth.io/api/providers/facebook/keys.png – Asif Mushtaq Jul 28 '15 at 19:30
  • Yes it worked out. I thought URL should be the one that is accesssing it( I thought its my site rather its indirectly oauth site). – G_S Jul 29 '15 at 03:57