0

I've been having this annoying issue for couple of days. If I do this:

https://graph.facebook.com/endpoint?key=value&access_token={appId}|‌​{appSecret}

It displays this error:

{ "error": { "message": "(#803) Some of the aliases you requested do not exist: endpoint", "type": "OAuthException", "code": 803, "fbtrace_id": "CSTbks4jPbc" } }

And from the script:

var appSec = $('#appSec').val();
var appId = $('#appId').val();

(function (d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) {
                            return;
                        }
        js = d.createElement(s);
        js.id = id;
        js.src = "https://connect.facebook.net/en_US/sdk.js";
                        fjs.parentNode.insertBefore(js, fjs);
                    }(document, 'script', 'facebook-jssdk'));

        window.fbAsyncInit = function () {
        FB.init({
            appId: appId,
            xfbml: true,
            cookie: true,
            status: true,
            version: 'v2.5'
             });
            FB.Event.subscribe("xfbml.render", changeSettings)

                    };

            var changeSettings = function (token) {
            console.log("aa");
            yourToken = token;
            FB.api('/' + appId, 'POST', {
                     "access_token": token,
                     "canvas_url": "https://apps.facebook.com/servis-racunara",
                     "secure_canvas_url": "https://servis-racinara.com/inventory_manager_a/"
                            },
             function (response) {

              if (response && !response.error) {

                                }

              console.log("bb");
              console.log(response);

               }
               );
             }

Pops out this error in console: enter image description here

And I really don't know what to do or try anymore. Is it due to some app settings, and if it is, what is proper way to configure app on facebook? If it's not that, what else am I missing? Please help I'm stuck. UPDATE: Note that I've already considered and tried similar questions like this: trying to get app access token and this: Getting App Access Token for facebook app?

Community
  • 1
  • 1
Ognj3n
  • 759
  • 7
  • 27
  • there is no api endpoint called "endpoint"...what are you trying do achieve? – andyrandy Feb 23 '16 at 13:39
  • btw, just search for that other error with google, there are hundreds of stackoverflow threads about it already. – andyrandy Feb 23 '16 at 13:46
  • I really don't know anymore.. I need to change `canvas` and `secure_canvas` url's of facebook app.. I that url as answer to someone else's similar question and tryed.. I'm pretty new to all this facebook api stuff – Ognj3n Feb 23 '16 at 13:47
  • you should never expose the app secret in your client code. you should do calls with the app token server side instead. either way, check out that other thread about your error message. – andyrandy Feb 23 '16 at 14:02
  • I've made a form where users need to insert their app Id and app secret and then I made their app access token. Could you please help me how to do it server-side? – Ognj3n Feb 24 '16 at 06:11
  • in that case, a client side solution may be good enough. better than transfering the token to the server over network/internet...anyway, see that other thread about your error message, it is a very well known one. – andyrandy Feb 24 '16 at 09:15

0 Answers0