friendship/create, and OAuth?

134 views
Skip to first unread message

Fahim

unread,
Oct 4, 2009, 2:27:55 AM10/4/09
to Twitter Development Talk
When I issue a friendship/create request using OAuth authentication,
I seem to get a 404 error. The same request sent using basic
authentication appears to work correctly. Is this a known issue or
something new that has not been encountered by anybody else before?

I've tested other OAuth requests (status updates, timeline requests
etc.) and they all work fine. So this is not an OAuth issue as far as
I know.

Anybody else encounter something similar and perhaps know of a
workaround?

Regards,

Fahim

Fahim

unread,
Oct 5, 2009, 10:33:29 PM10/5/09
to Twitter Development Talk
Nobody knows anything about this? I've tried three different OAuth
frameworks (one in PHP and two in Objective-C) and all of them return
a "Page not found" for a /friendships/create.json

Is anybody on the Twitter team able to confirm or deny whether this is
a bug?

Regards,

Fahim

Josh Roesslein

unread,
Oct 5, 2009, 10:51:57 PM10/5/09
to twitter-deve...@googlegroups.com
I have tested friendships/create using my python libraryvia oauth and
works fine.
My guess is you are not generating a valid oauth request (ex. invalid
signature).
Could you provide a link to the code you are trying and what libraries
you are using? It would help
others in diagnosing your issue.

Best of luck,

Josh

Fahim

unread,
Oct 6, 2009, 2:43:59 AM10/6/09
to Twitter Development Talk
I have tested using three different libraries - one is MPOAuth, the
other one is the PHP library linked to via the Twitter API wiki and
the last one is my own custom Objective-C framework. None of them work
- but only for the friendships/create method. The code works fine for
other methods, as I mentioned. So I don't believe this is a signature
issue. Plus, if the signature is invalid, the error should say
"Invalid signature" rather than "Page not found", right?

Josh, which Python library did you use? Perhaps I can test using the
same library and see what results I get to see where things might be
going wrong ...

regards,

Fahim

jmathai

unread,
Oct 6, 2009, 11:28:46 AM10/6/09
to Twitter Development Talk
It also works using twitter-async. You can run the unit tests.

http://github.com/jmathai/twitter-async/tree/master

Fahim

unread,
Oct 6, 2009, 9:32:31 PM10/6/09
to Twitter Development Talk
Turns out that the bug was in a different place - what I get for
"from_user_id" via search is not the user's ID but some other ID. I
had not looked at the notes for "search" or otherwise I would have
known about this defect. So I was happily issuing friendships/create
requests using the invalid ID and that was why I was getting 404s. Now
that I've fixed that, the friendships/create actually works fine.
Thanks to all who responded :)

Regards,

Fahim
Reply all
Reply to author
Forward
0 new messages