Grow your CSS skills. Land your dream job.

Login with Twitter (Kirby)

  • # January 12, 2013 at 12:43 am

    @traq Hmm. I tried putting my Kirby site into a folder so nothing conflicted and it still doesn’t work. So weird. Appreciate the help very much. Thank you.

    # January 12, 2013 at 12:48 am

    observation:

    you can put OAuth in some other directory, but you have to change the config:

    **`opauth.conf.php.default`**

    ‘path’ => ‘/wherever/you/want/to/put/OAuth’,

    *****

    questions:

    have you downloaded the [Twitter strategy](https://github.com/uzyn/opauth-twitter)?

    do you have a twitter `key` and `secret` (you’ll need to add these to your config)?

    twitter provides a “non” secret to test with as well: `L8qq9PZyRg6ieKGEKhZolGC0vJWLw8iEJ88DRdyOg`

    # January 12, 2013 at 1:00 am

    @traq I have. Mind if I message you a zip of what I have?

    # January 12, 2013 at 1:04 am

    @chrisburton

    not at all. I’m probably going to bed soon, but I’ll have a look mañana.

    # January 12, 2013 at 1:07 am

    @traq Not a problem. Thanks again.

    # January 12, 2013 at 1:54 am

    I just realized I’ve been saying “OAuth” this whole time, while we’re actually talking about **Opauth**.

    * * Smacks forehead * *

    goodnight.

    # January 12, 2013 at 1:59 am

    Ha. I knew what you were referring to regardless. I’m exhausted from trying to figure this out off and on for 10 hours. Have a good one.

    # January 12, 2013 at 10:58 pm

    okay: I got this response

    > Authentication error: Opauth returns error auth response.
    Array
    (
    [error] => Array
    (
    => 401
    [raw] => Failed to validate oauth signature and token
    [provider] => Twitter
    )
    [timestamp] => 2013-01-13T03:53:59+00:00
    )

    AFAICT, this is a standard response when the provider (twitter) rejects the authentication attempt.

    So, the Opauth example seems to be working fine, it’s just not successful. I don’t have my own twitter key+secret to test with – are you sure those you sent me are correct?[code] => 401
    [raw] => Failed to validate oauth signature and token
    [provider] => Twitter
    )
    [timestamp] => 2013-01-13T03:53:59+00:00
    )

    AFAICT, this is a standard response when the provider (twitter) rejects the authentication attempt.

    So, the Opauth example seems to be working fine, it's just not successful. I don't have my own twitter key+secret to test with - are you sure those you sent me are correct?

    # January 12, 2013 at 11:04 pm

    @traq I’m 99.9% positive. Should I create a completely new set?

    # January 12, 2013 at 11:11 pm

    @traq I created an entirely new application and I’m still getting the same error. I’ll send you the new file here in a second.

    # January 12, 2013 at 11:23 pm

    … Have you set up a callback URL with twitter (it doesn’t need to be a real URL, just needs to have a value)?

    … Have you made your Twitter app an “@Anywhere” app (whatever that means)?

    I’m moving testing onto a live site, just in case it’s “localhost” that’s the problem – twitter seems to be a stickler about which domains it will authorize requests from. Maybe that’s why the example recommends trying FB first.

    I’ll let you know.

    *****

    **edit** no, no need to create a new key+secret. I’m getting the same response with my own set.

    # January 12, 2013 at 11:27 pm

    @traq

    > … Have you set up a callback URL with twitter (it doesn’t need to be a real URL, just needs to have a value)?

    > … Have you made your Twitter app an “@Anywhere” app (whatever that means)?

    Yes, I have done both.

    >I’m moving testing onto a live site, just in case it’s “localhost” that’s the problem – twitter seems to be a stickler about which domains it will authorize requests from. Maybe that’s why the example recommends trying FB first.

    I’ve tried doing the same thing with no luck. However, once you’re redirected to the callback.php file with that error, refresh and it tells you specifically what the issue is.

    > no, no need to create a new key+secret. I’m getting the same response with my own set.

    Too late, sorry!

    # January 12, 2013 at 11:35 pm

    @traq Also, I tried this tutorial not too long ago and it worked like a charm. Not sure if I should still go about using it, though.

    http://shiflett.org/blog/2010/sep/twitter-oauth

    # January 13, 2013 at 12:44 am

    why not? if you got it to work, and it’s what you want, go for it.

    *****

    did you get an error message besides “Failed to validate oauth signature and token”?

    # January 13, 2013 at 12:46 am

    also, if you’re not testing in your site root, you might have to update the path in the `RewriteRule` in .htaccess as well as in the conf file.

Viewing 15 posts - 16 through 30 (of 56 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".