Is anyone else having a problem with Youtubes Api while trying to get live users? - api

Checking for live users with youtube's API isn't working for me.
https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=*****&key=*****&type=video&eventType=live
removing channelId or eventType works but that's not what im looking for, could
this youtubes side or something?

There is definitely something going on with the YouTube Data API. If you give it a try on the on the Deverloper Console for Search: list it won't work if you are providing channelId. However, if you provide channelId it will always return 0 results.
Google's instructions for getting help say to add the tag google-apis-explorer to your post. If you can edit that, give it a try. Hopefully we'll all get some answers soon.

Related

Instagram ?__a=1&max_id=<end_cursor> isn't working for public user feeds

I've been using Instagram's undocumented API https://www.instagram.com/<user>/?__a=1 to get a public user feed.
I was also able to get multiple pages via their max_id query parameter like so: https://www.instagram.com/<user>/?__a=1&max_id=<end_cursor>
end_cursor = json_response.graphql.user.edge_owner_to_timeline_media.page_info.end_cursor
(yes, "has_next_page" is true)
They had a recent change to their JSON format and I think they might have broken other functionality.
The "end_cursor" is still there but when I use it I just get back the same Instagram posts as if I wasn't using it.
Just to make sure I'm clear, my issue is that the max_id=<end_cursor> doesn't seem to work anymore for a public user feed. I can still get the first 12 posts, but no more after that.
Anyone else seeing this problem?
here's a JSFiddle example of what I mean:
https://jsfiddle.net/LLsg91ja/33/
04-14-2018 - NO LONGER WORKING - INSTAGRAM DEPRECATED THE '?__a=1' & '?query_id=17888483320059182' - THIS NO LONGER WORKS!
Okay take a look at this for media pagination:
https://instagram.com/graphql/query/?query_id=17888483320059182&id=<user_id>&first=12&after=<end_cursor>
This returns:
['data']['user']['edge_owner_to_timeline_media']['page_info']['end_cursor']
And Media:
['data']['user']['edge_owner_to_timeline_media']['edges']
the 'query_id' is static now so just use: 17888483320059182
'id' is the "instagram user id" so you have to use ?__a=1 to grab ['graphql']['user']['id']
'first' is the number of photos you desire returned. Just use 12 to keep the media return the same.
'after' is the new 'max_id' for use ['data']['user']['edge_owner_to_timeline_media']['page_info']['end_cursor']
I'll test more and respond later.
Responding Later:
It is believed 'pagination' using ?__a=1 has been deprecated. If true then there is no answer which can solve the op's direct question using ?__a=1 for Instagram pagination.
But the code provided in this answer will provide the pagination of Instagram media which does provide the results the op was seeking.
The answer incorporates the 'instagram graphql api' which is the current api (and not the json ?__a=1 hack) so this answer should provide some stability for now.
As used on my live site:
Grab the id=<instagram_user_id> prior the Instagram media request:
profile = https://www.instagram.com/<instagram_username>/?__a=1
media = https://instagram.com/graphql/query/?query_id=17888483320059182&id=<profile['graphql']['user']['id']>&first=12&after=<end_cursor>
You can use this: ?__a=1&page=3

Twitter API update_profile_banner

Can anyone help with using the Twitter API to upload a profile banner using the account/update_profile_banner? I have been searching on Google for so long and can't find any solution, thanks in advance
Based on https://gist.github.com/hayesdavis/97756
It looks like the docs are misleading, unless you are uploading a really small image, I expect it is critical to use multi part form data instead of encoding data in the query params.
Post your example code though, it's bad stackoverflow form to just say it doesn't work without showing the code and errors you are getting.

Getting an instagram picture/video based on the hashtag

I want to know if it is possible to get photos and videos from instagram with a specific hashtag to post on a website I'm developing. I searched other questions before and I and I got a partial answer. I was referred to the Instagram API endpoints but no other questions were answered about getting pictures and videos based on a specific hashtag/tag. I'm new to this so I may be missing some obvious things but I'm willing to learn all I can about this.
C,
You must call
https://api.instagram.com/v1/tags/YOUR_TAG/media/recent?access_token=YOUR_TOKEN
Where YOUR_TAG is the tag you are looking for and YOUR_TOKEN is the access token.
More about the media/search endpoint you can found at: http://instagram.com/developer/endpoints/media/
You will need write a code to get it, and read the json it returns.

How to obtain Allmusic info from Spotify API?

Their search API documentation suggests that AMG and MusicBrainz ids/uris come back in the response: https://developer.spotify.com/technologies/web-api/search/
However, the current responses to their example API calls seem to omit this data:
http://ws.spotify.com/search/1/track?q=foo
Am I not understanding something correctly, or did they just forget to update their documentation?
I checked their support page and it sent me to stack overflow to ask my question:
https://developer.spotify.com/support/
The ids to AMG and Musicbrainz were there before for the content that was matched (not everything was matched however). Now all ids seem to be missing. You are understanding correctly. The documentation is bad.
Since this is an API question, this is the correct forum.

Table blocked on YQL?

I'm trying to retrieve a user timeline from Twitter using YQL's community Twitter table. The full REST url is
https://query.yahooapis.com/v1/public/yql?q=SELECT%20*%20FROM%20twitter.status.timeline.home%20WHERE%20oauth_consumer_key%20%3D%20'kt9wDTrDREjXzRhBMpw'%20AND%20oauth_consumer_secret%20%3D%20'zNnA76G3NhZSeaJdRv7munbyutlcqK8k0hazf6JrEo'%20AND%20oauth_token%20%3D%20'195tuy9661-yJFEsgA0VPCwg6gsNHtuy2y2Kq2LwTdKe4BRYa4j'%20AND%20oauth_token_secret%20%3D%20'myWfyDTtOHscMmJy6tuyU1XDyiZJiIIRkK7sIPvT2ngI'&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys
(keys have been mangled to protect the guilty)
The response I get is:
The current table
'twitter.status.timeline.user' has
been blocked. It exceeded the allotted
quotas of either time or instructions
As I seem to be doing the querying correctly, I'm at a bit of a loss as to why I should get this response, particularly since it works as it should through the YQL console. The only thing I can think of is that I need to authorize my query somehow with an API key, or oAuth credentials, but I haven't been able to find a comprehensible example of how to do this.
Can anyone possibly point me in the right direction on this? YQL's community tables seem to offer a marvelous way to do very complicated things with ease, so I'd hate to fall at the last hurdle so to speak.
According to the twitter docs the call to this API endpoint is supposed to return the last tweets from the authorized user, right? Not from any kind of user. Just checking that this is really what you want to achieve.
From: http://dev.twitter.com/doc/get/statuses/home_timeline
Returns the 20 most recent statuses,
including retweets if they exist,
posted by the authenticating user and
the user's they follow. This is the
same timeline seen by a user when they
login to twitter.com.
This is the definition of the datatable that you are using. I am a bit confused about the #id parameter in the example of that datatable because I don't see it being used anywhere.
www.datatables.org/twitter/twitter.status.timeline.home.xml
The error message you get sounds like an internal YQL error message and not like something that comes from Twitter, doesn't it?
Sorry for not being able to provide answer right now but maybe raising other related questions can help somebody else or you to figure it out. If I crack this later I will add to this again.