• Confusion over OAuth callback

    By K Clark 1 decade ago

    Hi,

    I've been trying to test the OAuth functionality with Social Enabler but have hit a brick wall.

    I have set up apps in Dropbox, Twitter and Facebook - I have my ids, my keys and secrets etc falling the various instructions I've found, however, all services are failing.

    Twitter & Dropbox are both giving the same issue:

    Error while executing JavaScript action expression
    Script interpreter error, line=2, col=30: Error calling method 'authenticate(boolean)' on java class 'com.ibm.xsp.extlib.sbt.services.client.endpoints.TwitterEndpoint'
    Error while acquiring OAuth token
    Failed to get request token. requestUrl:https://api.twitter.com/oauth/request_token, authorizeUrl: https://api.twitter.com/oauth/authorize, accessUrl: https://api.twitter.com/oauth/access_token, callback: null, truncated key:jrvd....IhlA, truncated secret:WKJb....J2HI. OAuth callback is empty, please check with your application vendor to ensure a callback is not required.
    api.twitter.com

    Facebook, when loging on via the client api comes back with:

    Given URL is not permitted by the application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains. 
    

    The same things keep popping up when searching for solutions - there are definitely leading or trailing spaces.

    Time and again I see talk of the callback uris. However, in the 3 types of apps - the callback apis you specify in the apps themselves seem to want different things.

    With facebook there is also talk of the appdomain and in Drobox it won't allow a callback url with http.

    The domino server I'm working on is not accessible externally but it is getting 'out there' so to speak, as I know that before my current facebook error, when the app was in sandbox mode, it was giving that as the error message - so is being reached. But there is no domain as such to reference/i can't find any settings that work in any of the apps. It's running on http://dominoserverx/KC/XPagesSBT.nsf

    The twitter and facebook apps have been accessed by other sources - testing using simple wordpress apps, so they seem ok outside of the social enabler area.

    Other notes - the Oauth Token store & the XPages Social Enabler has anonymous access set to nothing. The tokens have the signing id in the Authorise user form.

    If anyone can give me help on any of these it would be much appreciated. My final goal is not to hook up these apps in fact, but I'm just trying to prove that the Extension Library works for OAuth to authenticate with something else.

    Thanks

    • XPages and OAuth

      By Padraic Edwards 1 decade ago

      Hi,

      Sorry to hear you are having configuration issues with OAuth but hopefully I can help unblock you. Can you tell me what version of the Social Enabler you are using? Is it an 8.5.3 build or 9.0?

      Let me share some my app settings with the various OAuth providers so you can confirm your own settings are right.

      Twitter

      Dropbox

       

      FaceBook

      The facebook site url needs to match the server where you are running it. So in your case it should be "http://dominoserverx/KC/XPagesSBT.nsf/FacebookClientAPI.xsp" I believe

      If you are still having issues, can you send on your logs from your data directory on your server under/Data/domino/workspace/logs

      You can attach them in a response here or email them to me : padraic dot edwards at ie dot ibm dot com

      Finaly, if possible I would recommend that you use the latest version of the XPages Social Enabler Appication which now resides within the Social Business Toolkit SDK -http://ibmsbt.openntf.org/ . As this is the version we are currently testing with. You will just need to install the SDK plugins as per the instructions I describe in this webinar

      http://www.youtube.com/watch?v=oQz0yvYZZig


      Thanks,

      Padraic


       

      • Thanks - using 8.5.3

        By K Clark 1 decade ago

        Thanks Padraic,

        Sorry - I can't believe I ommitted that info - I'm using 8.5.3, with the last version available for that - ExtensionLibraryOpenNTF-853.20130315-0724.zip

        Thanks for the examples - that's really useful so i can compare them against what I'm doing.

        Will come back with the logs if I still get the failures.

        Thanks

        Rgrds

        Katie

      • quick question re Dropbox

        By K Clark 1 decade ago

        hi Padraic,

        One other quick question - on Dropbox on the Settings tab - do you have anything in the OAuth redirect URIs field?

        Thanks

        Rgrds

        Katie

        • Response

          By Padraic Edwards 1 decade ago

          Hi,

          I don't have anything set in the OAuth redirect URIs for Dropbox. Thanks for environment info. If I get a chance I will try the combination of 8.5.3 plus that ExtLib build you have to check if it works.

          Thanks,

          Padraic

      • Error logs attached

        By K Clark 1 decade ago

        Error logs from today attached. The Twitter matched up to the example, the Dropbox settings were the same - just wanting to check if you used a OAuth redirect URIs setting. Mine is blank currently but I've seen talk of this field possibly being needed and had tried a couple of things.

        Facebook I have put aside for the time being as it won't allow me to enter a Site URL because my test server doesn't have a domain as just in test so I get "Site URL must be a URL with a valid domain." in facebook.

        Thanks

        Katie

        • connection issues

          By Padraic Edwards 1 decade ago
          Hi,
          
           
          
          It looks from the logs that your Domino server cannot reach Dropbox or Twitter
          
           
          
          java.net.UnknownHostException: api.dropbox.com
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:227)
	at
          
           
          
          java.net.UnknownHostException: api.twitter.com
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:227)
	at
          
           
          
          Can you check the connections on that server? Are you able to ping the above addresses?
          
           
          
          Thanks,
          
           
          
          Padraic
          
          • Possible Proxy

            By K Clark 1 decade ago

            Thanks again Padraic,

            Can't get to those and on looking at what's said about those errors, it's looking like there may be a proxy getting in the way.

            So, I was looking in the wrong direction thinking the apps were flawed - they indeed seem simple - the problem it seems is in house.

            Thanks for helping me narrow it down.

            Rgrds

            Katie

          • Proxy Server responsible

            By K Clark 1 decade ago

            It has turned out that there is a proxy server blocking the api calls.

            They are not keen on letting us around this so I'll probably need to code the proxy server authentication somewhere. Will come back and make back if/when find out where/how.

          • Ext Library modification/set Proxy

            By K Clark 1 decade ago

            Hi,

            I didn't want to have to be back with questions so soon, but I'm struggling to work out how best to work around this. I'm getting quite lost as I delve into the depths of the extension library.

            Where might it be 'safe' to amend the extension library to do proxy server authentication?

            Any idea if http.proxyHost/ http.proxyPort/ http.proxyUser/ http.proxyPassword

            can be used in a scenario like authenticating with dropbox/twitter.

            Thanks