简体   繁体   中英

Can't access twitter profile URL - using STTwitter Wrapper

I'm using the STTwitter wrapper to connect with Twitter and I'm running AppOnly and I'm able to retrieve the tweet text with no problems. I'm using the getStatusesUserTimelineForUserID method for that.

The problem is that I can't access "twitter_profile_url" or "profile_banner_url" but I can access text and tweet time and tweet ID perfectly fine.

I did however manage to get the twitter_profile_url by using the getUsersShowForUserID method.

My question is that am I doing something wrong when trying to access twitter_profile_url with getStatusesUserTimelineForUserID ? I looked over Twitter's documents and I think the reason why getUsersShowForUserID works is because of the includeEntities property. I'm not 100% sure on that so I was wondering if someone could clarify that for me?

The endpoint statuses/user_timeline.json returns a list of tweets.

Each of these tweets has a user dictionary, and this dictionary should have keys such as profile_image_url , profile_image_url_https , profile_banner_url , profile_background_image_url or profile_background_image_url_https .

So yes, it should be working, and if not then please open an issue on STTwitter project and post the exact code you're using.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM