Search

I know this extension is in beta, but I think the documentation needs to be a little more clear in some areas.

I have set this up with Facebook, and I actually have it validating the login/token. Now I want to return some data about the user, so I need to create the oAuthRemote datasource. I'm not quite sure what to put as the PATH and Included Elements.

I have it doing something, but I'm still confused. I've set the PATH as https://www.facebook.com/dialog/oauth?client_id={$oauth-user-id} and that actually returns something as long as the Included Elements is set to just data and nothing more. Otherwise I get a "No results found." message.

This is what gets returned in the XML:

<testing status="fresh" creation="2013-05-05T14:34:21-06:00">
    <data>
  <id handle="id" value="id">https://www.facebook.com/dialog/oauth</id>
  <shares handle="shares" value="shares">558</shares>
</data>
</testing>

But back in the datasource, I'm unable to add any namespaces at all. Clicking the button doesn't seem to do anything.

I guess my question is: Am I entering the PATH/Included Elements XPath correctly?

hi there sorry for not documenting this properly; I have had a major re-write of this to make it multi-purpose but I've issues finding time right now...

Looking at it it seems that the path is not entirely correct. The system is made to handle Front-end requests only at the moment. So basically you can use it to authenticate users. The Path should reflect the path of the request. For example if you want information about the current user in Facebook it should be me/. The system automatically appends the correct Facebook API version url on the front. That way tries to abstract the version/urls of the separate APIs

The included elements; should reflect the stuff that is returned by facebook XML; so you would have to select / for example to have all the XML available. It works similarly to the Remote Datasource in that respect.

If it still doesn't quite work for you let me know.

Ah! I was just barely coming here to note that I needed to use /me instead, but I was using it with the Facebook API at the front, so I was getting a 400 error. Removing that seems to be working great, awesome!

So, the output type is JSON, and entering just / as the included elements still seems to work. I was expecting to have to maybe use $ for JSONPATH, but that doesn't seem to be the case.

Still a little confused on the Namespace declarations though, as they still don't seem to be working. But maybe that's just not available for Facebook?

Either way, awesome. Thanks for the reply!

No problem sorry didn't reply earlier but for some reason was not checking it during the day today...

Namespace declarations not too sure; it should work in the same way as remote datasource... most likely in JSON this is not required its more for XML when you need to have things like date:day where the namespace would match up with date

Hi, i am testing the extension and found it very interesting, having a login with FB and members login too is very cool. But if i remove the app in the privacy settings of FB the symphony website still try to connect: oauth events remains logged in and the datasource return an error 400. Is there a way to log out ? perhaps removing the cookie.

To be fair I don't think I had gone that far into it. 400 would be because the user has revoked the rights.

If the datasource throws a 400, you could catch the error and ask the user to Authenticate again, sending him to the authentication page. Same like when a user is not logged in.

Also on which version of Symphony are you running it? As I might just want to have a look see if I can get something running. However the last time I've used this it was with Symphony 2.3

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details