h5bp / movethewebforward

Project archived.
http://movethewebforward.org
283 stars 65 forks source link

Old twitter search api #104

Closed hzlmn closed 5 years ago

hzlmn commented 9 years ago

Seems like avatars.php file use old twitter rest api (v1 and now v1.1). As this file generete avatar links , page sections #learn, #ask4help, #helpothers, #feedback, #explore" and other don't work correctly (contributors avatars don't visible).

arthurvr commented 9 years ago

Yeah, it's indeed broken atm. If anyone is willing to submit a PR? :)

hzlmn commented 9 years ago

@arthurvr Seems, like twitter now use secure requests with OAuth, so it's can be tricky for PR, because without application registration request will return "Bad authentication code". See: https://dev.twitter.com/oauth

joel-powers commented 9 years ago

Does this have to be done in php? Or could it be done another way? Half if the problem is that this looks to rely on user_name when it should be user_id instead. But really the caching is booked all over the place and should either be dropped altogether or rewritten. Thoughts?

arthurvr commented 9 years ago

Does this have to be done in php? Or could it be done another way?

I'm personally happy with any way possible. Though I don't know if our server is capable of running much other things than PHP. Would need to double-check that.

But really the caching is booked all over the place and should either be dropped altogether or rewritten.

:+1:

joel-powers commented 9 years ago

I'm off the opinion that we could skip the cache and just pull in the avatars with jQuerry... But that's just me. On Jun 30, 2015 11:04 AM, "Arthur Verschaeve" notifications@github.com wrote:

Does this have to be done in php? Or could it be done another way?

I'm personally happy with any way possible. Though I don't know if our server is capable of running much other things than PHP. Would need to double-check that.

But really the caching is booked all over the place and should either be dropped altogether or rewritten.

[image: :+1:]

— Reply to this email directly or view it on GitHub https://github.com/h5bp/movethewebforward/issues/104#issuecomment-117219955 .

joel-powers commented 9 years ago

After looking at this more closely, with no experience with Twitter's API, I'm now realizing the way this was done originally was - and still is - the best way.

The problem is that the API requires an oAuth token now, which was not required in v1, when this repo was created. I don't mind having on this, but the PHP file will have to be .gitignore'd for security and authored by someone else. Preferably, this should be the owner of the MTWF Twitter account.

At that point, there isn't much else to do. The .js file isn't going to change much. Or am I missing something?