0 users online. Create an account or sign in to join them.Users

Search

A new extension, "oAuth" is now available for download. Comments and feedback can be left here but if you discover any issues, please post it on the issue tracker.

Thanks for your great work, i tested your extension and corrected some points, for me as i am using only facebook it works nice.

I pushed my changes to a git fork, so you can take a look and make use of it if necessary.

Thanks, this is still a very-first beta and I am still working on it. glad you've already found it useful.

I have plenty of more features and options to add in the coming weeks

I get this error when I try to install this extension:

Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /www/sites/7ad/2c8/www.sumnoise.com/web/extensions/oauth/extension.driver.php on line 209

Any ideas?

Hmm what version of php are you using? As I've got no syntax errors on my end.

In any case the culprit would be if ($oAuthClassname::$oauth_version == '1.0'){ which is line 209 so I would suggest to replace $oAuthClassname::$oauth_version with $oauth->oauth_version

Basically its the function that checks which oAuth you would like to use. Since the oAuth variable is static I try to access it in a static way but I think in php 5.2 doesn't work so well should be fine in 5.3 though as its the Environment I'm working with

Thanks gunglien.

I tried your suggestion and got a little further, but ran into similar problems further down the line; I'm out of my depth digging around in the PHP myself, so I'll leave it for the time-being. My PHP version is 5.2.6-1; I might see if my hosting company will bump it up to 5.3 for me.

Cheers,
D

Yep, PHP5.2 does not support late static binding, which is quite annoying. It is available in 5.3+

No problem. I opted for late-binding as it was the most feasible option that didn't involve too much development work. You could replace those static accessors with a real instance of the object - should work without problems in 5.2

I replaced the static accessors, created an authorize page with a source parameter and attached the oAuth event to it, then I get this error:

Fatal error: ExtensionOAuth::oAuthStatus() [function.require]: Failed opening required 'lib/blowauth/OAuth.php' (includepath='.:/usr/share/php:/usr/share/pear') in /www/sites/7ad/2c8/www.sumnoise.com/web/extensions/oauth/extension.driver.php on line 227

It's worth noting, at this point, that I'm not entirely sure what I'm trying to achieve; however, I'm consistently being rate limited by Twitter, regardless of the length of time I set my DS to cache, and I think I'd understood that if I could authorise myself, using oAuth, this might solve the problem.

Does that sound right?

And finally, a massively naïve question (potentially the source of my initial problem, I suppose): where do I find my Twitter 'client ID' and 'secret'? I've registered an application with Twitter and in the 'oAuth Tool' I see 'Consumer key', 'Consumer secret', 'Access token key' and 'Access token secret'.

Do I want 'Consumer key' and 'Consumer secret'?

Thanks for the spoon-feeding!

You should find the key & secret here https://dev.twitter.com/apps just select your app and you should have all the details including the tokens.

Unfortunately the extension does not as of yet cover that scenario. This was built for client-facing login - so it stores the tokens in session. Give it a try but not sure it would completely resolve your problem...

I did have a discussion recently with @designermonkey where we were going to update this to cater for your scenario. Where you could have other extensions / datasources making use and extending the oAuth functionality. I was waiting for a spec of how he wanted it to be taken forward - I'll remind him maybe it goes a bit quicker.

--

I figured out you are refering to the extension where you'd like to add the key - /symphony/system/preferences/ should be in the preferences just look out for Twitter. Only Key/Secret you need to provide - not too sure about the scope

Thanks, gunglien; when I select my application at the link you provided above, I don't see 'Client ID' or 'Client secret' (but I do see 'Consumer key' and 'Consumer secret' – should I use those?).

I've found where to add the 'Client ID' and 'Client secret' in the preferences; I'm just not sure which values I should use from the settings page for my Twitter app.

Anyhow, even if this doesn't work, I'm glad to hear that my problem might have a fix somewhere down the line.

its the same thing client id & consumer key same for the secrets. Its something that different providers name in different ways... and I'm just doing an iteration over each provider in the back-end so had to choose one. will keep note to put some help somewhere for indication.

Yep I'll remind him so I get to put some more effort into this in my free time and have it wrapped up properly. Especially as I want to use google in a similar way for analytics api. So I'll get it done for sure :)

OK cool – I thought that would be the case. So I think I've got everything set up correctly now, but I still end up with this error when I try to access the front end of my site:

Fatal error: ExtensionOAuth::oAuthStatus() [function.require]: Failed opening required 'lib/blowauth/OAuth.php' (includepath='.:/usr/share/php:/usr/share/pear') in /www/sites/7ad/2c8/www.sumnoise.com/web/extensions/oauth/extension.driver.php on line 227

hmm probably caused by a require using a relative path.

Might be a pain to find all the require statements and have them replaced with EXTENSIONS . '/path-to-file' this is supposedly going to be tackled as well as I move away from blowauth library and use our own symphony-core based library.

I'll try find all the instances and patch them up over the weekend most likely.

Nice… well, I'll leave this for now and revisit it again sometime soon. Cheers, D.

Sorry for all the hassle this was my first extension from scratch released public - so bound to have mistakes / bugs / misconceptions. So I excuse myself for this and anything else that comes up

My auth token is empty

Strange; the basics should work... (even if I'm looking for a revamp when I get some free time)

If you had to open your config.php have you got the section with the Twitter oAuth details?

I have the same problem. The Twitter url has no oauth token. (Only tried with Twitter) Everything looks good in the config.php.

I am running this locally using MAMP. Could that have any effect?

I don't think it should developed in XAMPP. I'll have a quick look at it.

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