Dropbox Paper API - video not showing when posting markdown - dropbox-api

I am able to create new paper documents using the Dropbbox Paper API, however when I post markdown - nothing I try is able to include video's in the post - instead I get just the text and a link to the video - no video showing.
I try sending the same markdown as is exported and it still does not work - for instance neither of these forms work:
# Test
[https://youtu.be/rhSg9X3q2gc](https://youtu.be/rhSg9X3q2gc)
https://youtu.be/rhSg9X3q2gc

[Cross-linking for reference: https://www.dropboxforum.com/t5/API-Support-Feedback/Paper-API-video-not-showing/m-p/320408#M18892 ]
The Dropbox Paper API doesn't offer the ability to programmatically embed media like that unfortunately. When uploading using /2/paper/docs/create or /2/paper/docs/update you'll just get the text, as mentioned. I'll pass this along as a feature request.

Related

Example for google drive simple upload rest API

As per the documentation, if I wish to upload only media without any metadata, the simple upload will do. And the documentation says:
So, as per the documentation, I formed the request as follows and the body of the request is binary data:
But I am not able to figure out where to set the parent directory information for the media being uploaded if the body is comprised of only media.
Do I need to submit two requests, one for metadata and one for media? For that, we are provided with the multipart upload.
Can anyone please help me with a working example of a simple upload?
The form-data section in this Postman docs page might help you with entering the file location.
I found a YouTube video on the subject too.

how does GitHub support oembed?

how does GitHub support oembed?
According to this old gist
https://gist.github.com/skabber/54099
// URL scheme: http://gist.github.com/*
// API endpoint: http://gist.github.com/services/oembed/
// Example call: http://gist.github.com/services/oembed/?url=http%3A//gist.github.com/54099
But that unfortunately does not work. (I get http 404)
Now I know GitHub allows oembed because I can embed snippets in articles on medium.com
can somebody show me the URLs that I need to access GitHub Oembed services ?
p.s.
Just to help: had I asked the question for Flick instead of GitHub this URL would have been just the correct answer:
http://www.flickr.com/services/oembed/?format=json&url=http%3A//www.flickr.com/photos/bees/2341623661/
p.s. II
if somebody wonders why I am after this, it's because I want to see the JSON response provided by GitHub
GitHub does not provide oEmbed support for it's url. You can test with this oEmbed tester which tells you that the site is not oEmbed supported.
Medium doesn't unfurls its content with the help of oEmbed meta. It just takes the snapshot of the content (which would be displayed when opening the same url content in browser). Try the same by embedding a google doc content. You could get a clear picture of what medium does.
Medium uses embed.ly which is a api provider which provides embed content which could be easily added to your site.

How to define what will be inserted in share message?

I have an app with blog records per each user. I have add share button to my app, to give ability to post interesting blog records to users time line or to send to other user. But in default it takes image and text for share as it wants and not always correctly. So I find out that it can be dirven by meta tags (using for example "image" property to set image for share dialog). That's work ok on main page (where I'd like to make ability share with whole application), but on pages of blog records I cann`t customize it. meta tag should be in , but all info (short text and image of blog post) I get later in body, so I can insert it. How can I manage with this? Or may be there is another way to share content with?
What blog engine are you using? If it is a wordpress - try this plugin http://wordpress.org/extend/plugins/facebook-share-new/ from offician facebook docs http://developers.facebook.com/docs/. Otherwise I'd suggest to find a facebook plugin for your blog engine using google and install it.

Need to let user upload video using GWT

I need to let users upload videos in GWT site, and after uploading I should allow them to preview it. I don't need any controls, just a play and stop button would be enough so that I can show them a preview?
Uploading the video to your server is the easy part - that's what the FileUpload Widget is for. You just need to write some sort of end point on the server side - a servlet, PHP script, etc. that will receive the file and store it somewhere.
The tricky part is the preview - AFAIK, you need a media streaming server for that. The only free and good one I know is Red5 (site1, site2, site3 - don't know which one is the current one =_=).
An alternative would be to use an exisiting media streaming site that exposes an API for users to upload videos - like YouTube API. The docs show how to upload a file (directly from the user, or from your server) to the YouTube service - in return you'll get a link or HTML code to embed on your site.

How does facebook's Share a link feature work?

I'm trying to implement a feature like that where a user inputs a url and when displaying that url I want to have a custom display (an embed object if it's a video from youtube, a thumbnail if it's an image link, title and excerpt of body if it's a normal link).
How can such a feature be realized?
There is a new idea called oEmbed that a few sites support (Flickr, Vimeo and a few others) that addresses this problem. oEmbed site
Otherwise, just check the site against a list of ones you pick and then pull out the relevant bits to construct an embed link.
I liked the idea of oEmbed a lot but unfortunately it doesn't has that much adoption yet.
oohEmbed tries to solve this issue by building oEmbed for many websites.
For the feature to work, it needs the server's interaction where I believe the following scenario is how it works
Assume that we have the site humanzz.com and that it provides such feature
A user enters a url on the humanzz.com's webpage and presses a button like facebooks' preview button
An AJAX call is made to a dedicated page on humanzz.com
humanzz.com does calls the remote website and gets its data
The AJAX call now returns the page's data (oEmbed JSON object)
This involves so much server's overhead.
I really wanted to do it using JavaScript as the server's role was only to bypass "Same Origin Policy"'s restrictions.
oohEmbed allows bypassing the server's step by specifying a callback parameter to oohEmbed so that the JSON object returned is passed to a callback function on your page.
An example illustrating this is as follows
Add a script tag dynamically to your page
< script type="text/javascript" src="http://oohembed.com/oohembed/?url=http%3A//www.amazon.com/Myths-Innovation-Scott-Berkun/dp/0596527055/&callback=myCallBack">< /script>
This would result in executing myCallback(oEmbedJSONObject) which is great.
The problem with that solution is you still have to have a fallback for websites that don't have oEmbed representations.
For the embedded things, I have been using auto_html ( https://github.com/dejan/auto_html) with great success (vimeo, youtube, images) and even added soundcloud myself. But I am still looking for a "thumbnail" generation with an image and text facebook-like.
I guess you have to construct it by yourself by manually parsing the kind of URL you get.
If it is an image url, well then you just have to rescale it and in case the user clicks on it, then handle that by opening the original one somehow.
If it is a link to some youtube video, then you have to take a look at how the embedding of Youtube videos works. You can just copy the code that is provided by Youtube itself, and then exchange the parts with the URL to the video with the URL you got from your user.
I did never implement something like that, but I assume it should work somehow like this.