- This topic is empty.
-
AuthorPosts
-
January 13, 2013 at 1:31 am #120862
__
Participant> If I went to /example, I’d get a PHP error. I went to /example/twitter, I’d get the same error you received and if I refreshed that same page, the error would show what the problem was.
`Warning: array_key_exists() …`
`Invalid auth response: Missing key auth response components.` ?That’s actually a PHP error, because when you refreshed the page there was no longer an auth response. The example files have no error checking whatsoever.
If you got something else, what did it say?
January 13, 2013 at 1:57 am #120863chrisburton
Participant> Warning: array_key_exists() …
Invalid auth response: Missing key auth response components. ?That’s the one. I didn’t receive any other error besides that.
January 13, 2013 at 1:42 pm #120887chrisburton
ParticipantFrom briefly talking to the author of Opauth, this is on Twitter’s end apparently.
Additionally, I read on the discussion area of the API docs that it could be caused by the time of my server not being synced to Twitter’s server time. However, I don’t see this to be the cause after testing locally and on a live server.
January 13, 2013 at 2:49 pm #120894__
Participant> From briefly talking to the author of Opauth, this is on Twitter’s end apparently.
Did he have any insights as to what twitter’s problem is? AFAICT, Opauth seems to follow twitter’s API requirements.
January 13, 2013 at 4:43 pm #120902chrisburton
Participant@traq No. He just told me to contact Twitter. I just replied to that and basically said, “if it was on Twitter’s end, why would it work on an alternate library?”.
January 13, 2013 at 5:02 pm #120904__
Participant’cause the alt lib knows what twitter’s on about. : )
is Shiflett’s code what you tried that works?
January 13, 2013 at 5:13 pm #120905chrisburton
ParticipantJanuary 13, 2013 at 5:24 pm #120906__
ParticipantIs this session-only (twitter provides all info you need, users comment thru twitter), or are you integrating more tightly with your site (twitter authenticates, but you’re storing the comments yourself (and possibly other user data also))? Do you need to assign permissions to users that you won’t be able to determine indirectly, based on the info twitter provides?
Basically, are you flat-out *using twitter accounts on your site*, or are you only *using twitter as a sign-in mechanism*?
January 13, 2013 at 5:40 pm #120908chrisburton
Participant@traq Let me turn this around, what would you suggest?
I just want the user to be able to use their Twitter credentials (username and profile photo) for posting comments. Example.
In the form, I would also prefer that I have an edit option for the user to correct any mistakes. This stops them from commenting multiple times to clear up an error.
January 13, 2013 at 7:03 pm #120914__
ParticipantPersonally, I’d want to keep the comments myself – that doesn’t mean it’s a “better” solution, it’s just what I’d want. I’d maintain my own user/auth system; I’d just have twitter take care of the “sign-in” part. I wouldn’t necessarily be using much from the twitter API beyond that, though it would obviously be available.
January 13, 2013 at 7:17 pm #120916chrisburton
Participant@traq I think it may be smarter to do that in case I switch to something else. I will already have the comments in a database. Any ideas on how to go about this?
I’d obviously just have a login link that just authenticates (not authorizes) the user. I believe all I need is a single textarea field and some way to allow the user to edit their post. The form will be hidden by default until the user is authenticated. Or would I need some way of verifying the user?
January 13, 2013 at 10:54 pm #121005chrisburton
ParticipantUpdate: The author of Opauth is testing my code
January 13, 2013 at 11:06 pm #121006__
ParticipantAre you asking about the login or the comment form or the database?
Or all three
(1) Don’t include the comment form at all if not logged in.
(2) Every time you provide a form that’s tied to a specific user/action, it should have a token attached to it so you can validate that you gave the form to the particular user (recently).
(3) I’d think the DB would need to store…
… user.id of the comment author
… date+time comment was authored
… display status (show,hide,starred,buried,etc.)
… comment thread id
… the comment itself
You’d need an extra field if you allowed users to comment on comments – the above would work for a simple list (ordered chronologically), but you’d need more if you wanted a tree structure.
If you wanted to “version” comments (keep a record of edits), you’d need a field to track versions as well.
January 14, 2013 at 12:13 am #121007chrisburton
ParticipantI solved the Opauth issue myself. I only had to add my consumer key and secret into the config file and not into any other files like I was doing.
January 14, 2013 at 2:46 am #121012chrisburton
Participant@traq Hmm. Sounds complicated.
> … user.id of the comment author
This is to verify and target the user, correct?
> … date+time comment was authored
This could be used for displaying comments in a timely order.
> … display status (show,hide,starred,buried,etc.)
Not quite sure what I would do with this. Perhaps be able to delete comments?
> … comment thread id
This sounds like it’s for displaying the information on the correct blog post.
> You’d need an extra field if you allowed users to comment on comments – the above would work for a simple list (ordered chronologically), but you’d need more if you wanted a tree structure.
I will not be allowing this. If the user wants to reply to another user, @username that user.
> If you wanted to “version” comments (keep a record of edits), you’d need a field to track versions as well.
Not sure I’m understanding why I would need a separate field just for edits?
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.