How to get list of banned user in LiveChatBans? - youtube-api

YouTube provides the ability to ban and unban by liveChatId and channelId.
https://developers.google.com/youtube/v3/live/docs/liveChatBans
But only insert and delete are present, there is no way to get a list of banned channels (list, as in other areas).
In addition, when deleting, you need to use some kind of id, and there is no information on how to compose it yourself or get it through the list.
How to correctly implement a ban, unban and getting a list of banned users in my application?
I have no idea if this is possible.
Google's api is quite powerful, it seems strange that I don't find the obvious.

Related

Beginner Question: How to access the number of impressions from *other users'* tweets?

I've got a bunch of free online HTML, CSS, and JS tutorials under my belt and I want to try using them to make a browser extension. But I want to make sure that the data I want to use is actually accessible before getting started.
My goal is to make a browser extension for twitter.com that shows the number of impressions of any tweet next to the likes, retweets, and replies. My basic idea is to get the status URL of any given tweet, poll the Twitter API for the number of impressions of that tweet, store that in a variable, and then use CSS to display a little eye icon and the number stored in the impressions variable.
I know that I can find the number of impressions of all of my tweets, both through Twitter Analytics, and also just going to my profile page and clicking the little bar chart icon next to views, retweets, etc. But I'm not clear on whether I can do that for other people's tweets via Twitter's API or anything else. Can you?
For the record, I'm not too concerned about the varying definition of "impression," since it will be consistently applied across all tweets and I'm mostly interested in giving users a comparison between tweets. This is part of a research project to see how this might change how people engage with social media if they know how many views a given post has. If there's a simpler way to go about that using existing platforms, I'm open to suggestions.
Thanks for the advice!
No, impressions data is private. If you are authenticated to the Twitter API then you can use the new Twitter Developer Labs Tweets API to get private metrics like impressions, but you cannot get that for other people's Tweets. Also, the Twitter API does not support CORS, so I don't think you'll be successful trying to use it from a browser extension.

Get public users of a service (Tumblr, Twitter)

Assuming it's not available as part of API, how can one obtain a full or partial list of public users of a web service, e.g. Twitter, Tumblr, YouTube?
Acceptable alternative: get a random public user.
I was interested in this for testing APIs with a random account. This is useful to catch edge cases when developing an app for the API; For example when developing a Tumblr theme, seeing what volumes of text/images are posted, special character use, and so on.
Can you even imagine a full list of (public) users of largely used web services? That's a vast load of data. I hardly believe that any API would offer that for many reasons:
performance/load issues,
data/information privacy,
abusing possibilities,...
For regular usage of the service's API you simply don't need that. Otherwise it would stink with some gray/black techniques.
Anyway to answer you question objectively: In order to get full or partial list of users from web service it have to provide any kind of API which would allow you to do that. So good starting point is to look at documentation, for example Twitter API, Youtube API, etc...
By swift look I don't see any method that would offer that. It might change in the future but as mentioned above I strongly doubt about that.
Another option is to mine partial list of users via search APIs or traversing the site with a robot. Also obtaining such a list is an option. However I would check whether this is even legal and not against terms of use or something like that.

Displaying tweets from multiple users (similar to Embedded Timelines) without twitter-side user lists

I am new to Twitter and need some tips.
I need to display tweet feed from multiple users on some webpage.
The first thing I stumbled upon is Embedded Timelines. It allows to display tweets from list of users but the gotcha is that those lists should be maintained on Twitter-side (i.e. I cannot specify #qwe and #asd only on my side and get timeline without adding those users into list on Twitter-side).
The thing is that list of users that should be included into timeline is dynamic and managing those lists through Twitter API will probably be painful. Not to mention that my website will probably generate tons of those lists and I feel that I will violate some api quotas sooner or later.
So, my question is - am I stuck with using Embedded Timelines that refer some user list on Twitter-side and managing those lists through, say Twitter REST api, or there is a simplier way to do what I want?
It's pretty simple to display tweets for multiple users.
Links to start with
This post explains some of the search queries you can make
This post is a simple library to make requests to the twitter API that 'just works'
Your Query
Okay, so you want multiple users. The endpoint you're looking at using is the search/tweets one: https://api.twitter.com/1.1/search/tweets.json.
The query string uses :from and you can interpolate multiple froms with AND/OR.
An example query for the GET request:
?q=from:user1+OR+from:user2
Read more about the search API queries here.
Your "over-the-quote" issue
This is something you're going to need to figure out yourself - depending on the number of requests you expect to make, and the twitter imposed limits, maybe some sort of caching or saving information when you hit your limit, and only pull back from the cache whilst you're hitting your limit..

How to get a list of all retweeters in Twitter?

I have seen numerous companies doing like Twitter lotteries where users got to retweet their tweet and then one of retweeters will get the prize or whatever.
I was wondering now how do they get the list of all retweeters or pick the winner?
I checked Twitter API and found only this thing: GET statuses/retweets/:id but it returns maximum of 100 retweeters. Is that the only way?
It looks likes there's a couple services out there doing almost exactly this. A quick google pulls up http://onekontest.com/ and there's a few other Twitter contest services, but they all seem to be different levels of broken since they haven't kept up with changes to the API.
As far as the Twitter API itself is concerned, if you were expecting more than 100 responses, I think using GET statuses/mentions makes the most sense. That API call returns any mentions of a user, and you can pass the flag include_rts to include any retweets of your tweets. Then, if you wanted to list RTs of a specific tweet, you could check the in_reply_to_status_id field in the returned data to see if it matches the original tweet ID. This API call only returns the last 800 status, 200 at a time, so if you expect a bunch of data, you would need to poll the API repeatedly over time to get all the tweets. I imagine services like favstar are doing exactly this, just on a larger scale.
If you're actually looking for code to do something like this, I wrote a sinatra app called twitter-rss-digest which handles querying Twitter over time to track different sorts of queries. It's pretty rough, and doesn't quite handle this specifically, but it might point you in the right direction if you want to code something.
The Twitter API has an endpoint that returns up to 100 retweeter IDs for a given tweet.
Note that for historical reasons, that endpoint only returns up to 100 results and the documentation about the cursor is useless. Twitter refused to fix the situation.
2013 note
That said, the first thread on the Developers site that surfaced in a quick google has #episod, a Twitter employee saying:
You can't likely get to all of them. The data is spread out. Your best bet is to use the REST API to determine many of the users who performed the retweet, but the data will still be constrained.
It's easiest to track retweets as they happen rather than try to find them from the past. Use the Streaming API for that.
I like muffinista's method, but I think if you want a 100% complete list of retweets, simply enable the retweet email notifications and write a script that polls the email box for those matching the subject "retweeted one of your Tweets!" and put the data into a table. Do this right from the start.
The site https://twren.ch/ enlists all the retweeters for a given tweet (note that it only enlists retweeters who are direct followers of the source tweeter.) Nevertheless its probably the only public source available.

How do search engines see dynamic profiles?

Recently search engines have been able to page dynamic content on social networking sites. I would like to understand how this is done. Are there static pages created by a site like Facebook that update semi frequently. Does Google attempt to store every possible user name?
As I understand it, a page like www.facebook.com/username, is not an actual file stored on disk but is shorthand for a query like: select username from users and display the information on the page. How does Google know about every user, this gets even more complicated when things like tweets are involved.
EDIT: I guess I didn't really ask what I wanted to know about. Do I need to be as big as twitter or facebook in order for google to make special ways to crawl my site? Will google automatically find my users profiles if I allow anyone to view them? If not what do I have to do to make that work?
In the case of tweets in particular, Google isn't 'crawling' for them in the traditional sense; they've integrated with Twitter to provide the search results in real-time.
In the more general case of your question, dynamic content is not new to Facebook or Twitter, though it may seem to be. Google crawls a URL; the URL provides HTML data; Google indexes it. Whether it's a dynamic query that's rendering the page, or whether it's a cache of static HTML, makes little difference to the indexing process in theory. In practice, there's a lot more to it (see Michael B's comment below.)
And see Vartec's succinct post on how Google might find all those public Facebook profiles without actually logging in and poking around FB.
OK, that was vastly oversimplified, but let's see what else people have to say..
As far as I know Google isn't able to read and store the actual contents of profiles, because the Google bot doesn't have a Facebook account, and it would be a huge privacy breach.
The bot works by hitting facebook.com and then following every link it can find. Whatever content it sees on the page it hits, it stores. So even if it follows a dynamic url like www.facebook.com/username, it will just remember whatever it saw when it went there. Hopefully in that particular case, it isn't all the private data of said user.
Additionally, facebook can and does provide special instructions that search bots can follow, so that google results don't include a bunch of login pages.
profiles can be linked from outside;
site may provide sitemap

Resources