I want to make a chrome extension for YouTube. I need to obtain a user's YouTube channel id, if it exists. How to do that?
I tried to obtain google account id, but it does not look like YouTube channel ID.
chrome.identity.getProfileUserInfo(function(userInfo)
{
console.log(userInfo.id);
});
After it is executed, I get 10053**7950021, but my YouTube channel has UCMEh1bYibhq7tCRRm6cA2dw, as I get from the link. Either they use a very weird base to transform that base-10 number into UC..., or google account is not the same as YouTube channel. Could you help please?
Well there is help on this at https://developers.google.com/youtube/v3/guides/working_with_channel_ids
It tells you how to work with YouTube channel ids.
There is more info on it here, here, here, and here.
Related
I'm trying to debug something very weird.
I want to get reviews using Google Places API from this url:
Henderson Nisan
What I did?
First I search for Google Place ID via this URL
And the result for the Place ID was: ChIJoV7T0hjRyIAR24qv5IfRcWM
Than I fetch all information about Place with the next link:
https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJN1t_tDeuEmsRUsoyG83frY4&key=MY_API_KEY
I'm getting those reviews: http://prntscr.com/8q7bsd
Problem is that those reviews which you can see on above printscreen are not corresponding to the reviews that are on the page of Henderson Nisan
Any kind of help will be acceptable. What I miss? Did I use wrong Place ID?
Thanks
I've done what you've done:
searched for Henderson Nissan in https://developers.google.com/places/place-id , the returned place-id was ChIJlfPkKh_RyIARWKYl-XpSyAQ (not ChIJoV7T0hjRyIAR24qv5IfRcWM )
used this place-id to fetch results: https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJlfPkKh_RyIARWKYl-XpSyAQ&key=mykey
the reviews there are related to the particular google+ page
it's not clear how you got the place-ID ChIJoV7T0hjRyIAR24qv5IfRcWM, but it's clear that the detailsRequest to https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJN1t_tDeuEmsRUsoyG83frY4&key=MY_API_KEY uses a completely different place-ID: ChIJN1t_tDeuEmsRUsoyG83frY4 (for Google-Sydney )
I created a map using the new Google Maps and I am using the "embed this to my site" feature, but it has no search bar. The intent of the map is to enter an address to see if you fall within a boundary I created but I don't know how to alter the HTML code to add a search feature. I also have next to no HTML experience, so please be kind.
Here is what I have as the embed code:
No actual space between first < and iframe but I added it for it to show up
<iframe src="https://mapsengine.google.com/map/embed?mid=z-3d_xUUkSNQ.kL7YAhEFIavc" width="640" height="480">
</iframe>
There are many things you can do. One idea is you can use the address provided by your users to obtain the coordinate of the location. This can be done via google Geocoding service. Then from there you can determine if the given address falls within the region you have provided. You probably want to start playing around with HTML and Javascript first for a more complicated task like this.
In the version 2 of the youtube api, there was an updated tag that would give me the time the video was last updated. In version3 of the api I can't find the tag that represent this value. Is it possible that they removed it?
There is not an equivalent field in V3 yet, but it could be implemented in future.
I'm building an application where user-submitted posts are placed via their location as markers on a Google Map. The users are currently able to view the markers/posts on a map in relation to their current location.
What I'm aiming to do is allow the user to change the location of the map so that users can see the markers/posts in relation to another address, specifically via a form that allows them to enter an address and change the location of the map.
I found a YouTube video illustrating a pretty close approximation of what I'm aiming to do, but it unfortunately provides no code or instructions (http://www.youtube.com/watch?v=4uyIawlsvzU).
Is there a way to efficiently wrap an existing Google Map and the existing markers into a form such as this? I've searched for a solution but can't seem to find the proper way to achieve this. Many thanks for any feedback.
You need to search for LatLng by user specified address and to display it. I see not problems at all :)
Study Google Geocoding API for this (seems best solution for your case) and this example
I currently have a map mashup that has locations that I'm populating from my own database. A few users would like to also show that map on their site(s). I'd like to give them the ability to do that, but would like to retain the actual functionality of the map on my own site: like add "stuff" to places on the map through my a web form on my site. I could open the entire API to allow them to create their own form along with the data points, but most of the people wanting to put up the map aren't developers, they are just enthusiasts that have put together a personal page that they want to spice up.
I was thinking I could just provide a JavaScript of some kind that they could then take to place on their site, or maybe an IFRAME of some type, or...any ideas? Anyone implemented this? TIA.
I haven't done anything like this myself, but I think your idea to utilise an iframe is on the right track. In fact, this is how Google Maps generates its embed code.
Your app will need to generate a URL with all relevant Google Map parameters such as bounds, zoom level as well as your application-specific params. Any event that triggers the map to re-draw (drag, zoom, etc.) will generate a new URL.
If you try the embed link in Google Maps as an example, it generates a URL that looks something like this:
http://maps.google.com/maps?f=q&source=s_q&sll=45.434035,12.339057&sspn=0.003294,0.004812&ie=UTF8&ll=45.432724,12.338966&spn=0.006588,0.009624&t=h&z=17
This URL can then be wrapped up in an iframe which your end users can place on their web pages.
Re: resizing
Yes, it's possible to dynamically resize it if width/height is part of your application params that generates the embed code. Again using Google Maps as an example:
<iframe
src="http://maps.google.com/maps?f=q&source=s_q&sll=45.434035,12.339057&sspn=0.003294,0.004812&ie=UTF8&ll=45.432724,12.338966&spn=0.006588,0.009624&t=h&z=17&output=embed"
width="(width-param)" height="(height-param)"></iframe>
If you mean resized by user, after it's been displayed, I'm not sure.. most likely, yes.