Missing video ID from comment object - youtube-api

I am trying to retrieve a comment on a video by comment ID using the youtube v3 data api.
Here's the documentation part I am concerned with: https://developers.google.com/youtube/v3/docs/comments#resource
In the resource documentation, there's a property called "videoId" that I don't get when using this API call:
https://www.googleapis.com/youtube/v3/comments?part=snippet,id&key={YOUR_KEY_HERE}&id=z13cdfiygorrst1f422fuzi5eqevcdwsf
Edit: I have already been trying working around this problem to no avail, also started an issue on google issue tracker to no answer. As far as I know, the youtube-data-api tag is where the developers track the issues in the API.

I am not sure why the comments endpoint does not return the videoId, but the commentThreads does.
So calling https://www.googleapis.com/youtube/v3/commentThreads?part=snippet,id&key={YOUR_KEY_HERE}&id=z13cdfiygorrst1f422fuzi5eqevcdwsf and parsing the result to get the proper comment in the comment threads (that includes replies) seems like a reasonable workaround...

Related

Update namedStyles through Google Docs API

I am trying to update the namedStyles through Docs API, but struggling to find a way around it. It seems you can only create namedStyles when creating a new document through the API - batchUpdate doesn't seem to want to touch it.
Am I missing something?
Posting this for documentation purposes.
As Tanaike said in a comment, currently namedStyles cannot be updated via Docs API, even though this action can be done through Docs UI. There is currently no possible batchUpdate request to achieve this via API.
You could consider filing a Feature Request in this Issue Tracker component.

YouTube Live Streaming API - LiveChatMessage - userBannedEvent not receiving

liveChatMessages docs defines userBannedEvent as one of the message types, but response data contains only LiveChatMessages with type textMessageEvent.
The question is, can I get userBannedEvents from requests to YouTube API?
Looks like this is a currently known issue with no provided workaround as of the moment. This Reddit thread is from a year ago, but upon looking around, there doesn't seem to be any update so far. From the thread:
Yes, this is a known issue. We don't send userBannedEvent, messageRetractedEvent or messageDeletedEvent through the API right now.

How can I see all the comments with the Youtube API?

I have a problem in Youtube API Comments.
When i access http://gdata.youtube.com/feeds/api/videos/-12_0ZP2p4g/comments , he not show all comments in the video...
This is a problem for me, cause i need ALL information and comments.
When i access the video ( https://www.youtube.com/watch?v=-12_0ZP2p4g ), i found comments that are not on API.
Anybody know why this happens?
Tnks ...
It looks like you are currently using the 2.0 API, this API is deprecated now.
Anyway, to achieve what you want - with the 2.0 API - you have to implement some sort of pagination to move through the results.
If you parse what is returned you will get come across a <link> tag with rel='next' it's recommend that you use that link (the href attribute) to avoid pagination problems.
For more information check out : https://developers.google.com/youtube/2.0/reference?csw=1#Paging_through_Results

How to get links in comments from the YouTube api following the move to Google+ comments

In the new YouTube Google + comments system how can I retrieve comments that contain links.
For example if someone posts a link to another youtube video as follows:
http://www.youtube.com/watch?v=AZNHuFjnmUo
This gets converted to a link by the google plus system. The title of the video is shown as the text rather that the url. i.e. The html shown within the comments is this:
Francis HATES Google+
However the api for that comment only returns the title of the video which is pretty useless seeing as I want to get the link too. I am guessing that the system converts the url into an <a> tag which is stored in the database but then the api strips out the html when its requested so it only returns the videos title.
I have posted a defect here:
https://code.google.com/p/gdata-issues/issues/detail?id=5500
But that bug list seems to have very little activity going on in terms of responses to issues.
So is there another way to get the data I need?
What you can do while this bug remains is to extract the comment id and use it in the Google+ API with an activities.get request. This will return the full post with all links.
A bit cumbersome since it needs one request for each comment you want to check, but it seems to be the only way while the bug remains.
To take an example from the video you linked in the issue:
This YouTube comment returned by the API includes a YouTube link:
http://gdata.youtube.com/feeds/api/videos/rgkDKeSc-1o
/comments/z12hvvcgxznkufyo304ci1iqlnandzxjpes
You can use the z... ID in a request to the Google+ API:
https://developers.google.com/apis-explorer/#p/plus/v1/plus.activities.get?activityId=z12hvvcgxznkufyo304ci1iqlnandzxjpes
Which includes the full post including links.

API to post on Tumblr

I've been trying to upload an image to Tumblr from my iOS application for a little while now, but I can't get my method to work properly.
My current method uses ASIHTTPRequest and OAuthConsumer according to this guide.
However, I end up getting a 401 error (Authentication needed).
You can find the explanation for my problem here.
But my question is : Is there any other mean/API to post on Tumblr for iOS?
I saw that OAuthConsumer was not fully functional on that side, and I didn't find anything with the GTM.
Thanks.
Finally found a solution to my problem a few time ago.
I first thought that it was a bit old and that it wouldn't work but in the end, implementing the TumblrUploadr did the thing.
To sum it all, I achieved login with GTM-OAuth and uploading with TumblrUploadr. For those who seek a solution to the Tumblr API.
Update : Some info concerning GTMOAuth, if you want to use the callback, you have to add a flag in the GTMOAuthAuthentication.m > +(NSArray*)tokenAuthorizeKeys : add kOAuthCallbackKey in the array so that it will be taken into account. Else, you have no callback.

Resources