maya90 — 2013-09-10T13:44:31-04:00 — #1
oh brother... get error when try to post a question here...
question re Twitter API user timeline:
how do I get user avatar?? I cannot believe that when you request a user timeline it doesn't come with a url to the user's avatar....
this is what I get if I request ONE tweet with this url
$tweets = $Twitter->get('https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=NewYorker&count=1'):
WHY is the user avatar not included here? it's included when you run a search.... why not when you request a user timeline?
man, I don't get this, this should be a no-brainer.... so how do I get user avatar?
urls posted here also don't work.. get exact same msg about upgrading to 1.1...
(man, I guess these guys have never heard of a "falling back" transition period or anything like that....;-)
fretburner — 2013-09-12T09:33:05-04:00 — #2
Hey man, me again
The URL to the user's avatar is included in the response - about midway down the file you posted is this:
There was a transition period, but it ended on June this year, when v1 of the API was discontinued. If you check the accepted answer on that StackOverflow question you linked to, there's a note about the urls no longer working:
Update: Support for this method has been removed from v1.1 of the API. Recommended practice going forward is GET /users/show and cache profile_image_url locally in your service/app.
maya90 — 2013-09-12T11:54:45-04:00 — #3
hi fretburner, my mentor and savior!
man, you must think I'm a jerk.. I was confused with this JSON, http://mayacove.com/dev/tw/one_tweet2.txt
which I got the other day, I don't remember how, b/c I can't reproduce it now.. (no url for avatar here...)
that worked..... thank you very much...
(there are two urls: http & https, which one should I use?)
another question: I have been reading a lot of about Twitter's guidelines and requirements for displaying user timelines (they're very strict.. these guys really do protect their brand..) they say things like you have to indicate if it's a retweet and if it is, display the user's name and LINK to their TW profile page... (oh brother..)
I'm confused as to how you can tell whether or not a tweet is a retweet...
is this it? "retweeted": false,
if it's a retweet, then this would be set to "true" and the name of the retweeter would be posted?
(meaning I have to check when I'm looping for whether this is set to true? have yet to see one that is a retweet....)
one more question (for now... oh brother, the more I do here, the more q's I have..)
it's also a requirement to post the "action" buttons (reply, retweet, favorite...)
I don't know how you create those buttons (there are no instructions like there are for "follow" buttons for example.. can't find anywhere.. (have successfully created a "follow" button...;-) (I can't just "firebug" these action buttons.. urls are "#".....;-)
thank you again very much, FB!!
maya90 — 2013-09-12T13:02:02-04:00 — #4
now I have to do the "how long ago" tweet was posted feature.....
does example here make sense to you?