Problem: client has lot's of videos. He uploads them to youtube. i've built a simple cms for him where he updates the content on the site. I would like to simplify the process of linking the videos within the cms.
Currently he has to
upload the video to youtube
"embeded" the youtube code in the cms.
is there a simpler? better solution? any suggestions would be very helpful.
Thanks in advance.
Shane
Have the client create a YouTube channel and create playlist(s) within that channel. Then the client can just tell you which playlist(s) to include on the site and you can pull in all the videos within specific playlists via the YouTube API.
This way you set it (once) and forget it. And the client can maintain the playlists within YouTube as they see fit and know that the videos within those playlists will be automatically included on the web site.
Here are some sample code snippets:
// Init service.
YouTubeService service = new YouTubeService("MyApplicationName", "MyDeveloperApiKey");
// Get playlists for youtube user (your client).
PlaylistsFeed playlists = service.GetPlaylists(new YouTubeQuery("http://gdata.youtube.com/feeds/api/users/[CLIENT_USER]/playlists"));
// Get playlist feed.
PlaylistFeed feed = service.GetPlaylist(new YouTubeQuery("http://gdata.youtube.com/feeds/api/playlists/" + playlistID)));
// Get list of video IDs for playlist.
(from atomEntry in feed.Entries select (atomEntry as PlaylistEntry).VideoId).ToList());
YouTube API integration ASP.NET - upload video with a single page
Related
Is there any example - How to post jobs (open vacancy) on LinkedIn using LinkedIn API C#?
What I mean is: In a portal where some open job positions (open vacancy) are saved like (new position for sales assistant). To post it directly on LinkedIn when the new position is saved in our portal.
I am reading some documentations but I will be happy if there is any example (in Code C#)
Thanks a lot for your time 😊
I am looking to retrieve photos from Facebook and Instagram for viewing in a WPF application. The idea behind is to show user existing photos and allow them to upload more using C#. A bonus would be to let the user delete photos and set their profile picture, but is not a must.
I cannot find any APIs for either Facebook or Instagram for use in a WPF application, and the ones I did find were all for web (ASP.NET/PHP).
Is there such an API and how might I go about doing this?
Looks like they have what you're looking for in the Graph API:
https://developers.facebook.com/docs/graph-api/reference/user/photos/
Facebook Graph .NET API.
Using the Facebook .NET SDK
Here is an example I whipped up, haven't tested. Should work though. It retrieves the profile picture of a user. Though if you read through the APIs you can adapt it for whatever you need.
var client = new FacebookClient("accessToken");
object taskResult = await client.GetTaskAsync("/me");
var result = (IDictionary<string, object>)taskResult;
var userId = taskResult.Where(s=>s.Key == "id").First().Value
var profilePicUrl = string.Format("https://graph.facebook.com/{0}/picture", userId);
Facebook SDK
For instagram
This link will help you embeding the instagram on a simple html webpage.
There is a button on the bottom of the post on instagram.when you click on the link a menu pops up. then click on embed
now a box pops up
just copy paste the html and you are done.
it will fetch the post for you
I am in a process to develop an app in which the user would enter some text into the textbox . On click of search button , the application fetches list of all videos with details like link , thumbnail and title related to the input. Just like we do in youtube.
I want to bind that data to listbox .
My problem is I am unable to start with it. I have registered my app but do I need client Key and all because I am accessing public videos.
Any help would be appreciated
PS: I am able to do this with youtube. I want JSON data which I can bind.
Thanks
You can generate an unauthenticated token, and use it forever (it will not expire).
There is additional documentation here: https://developer.vimeo.com/api/authentication#unauthenticated-requests
I created an image uploader using c# mvc5. I managed to upload the images to google cloud storage. Now I want to get the url of the uploaded file to return to the user for reference. I've been looking around the docs in google and can't find it. Anyone can provide me some links or codes will be helpful. Thanks.
See the documentation page on Request URIs.
In general, if you upload to a bucket named foo and an object named bar/baz, the URL for your object will be:
https://storage.googleapis.com/foo/bar/baz
With the GCS C# .NET library, you can use one of the Storage.v1.Data.Object class properties:
MediaLink to get the download link, or
SelfLink to get the canonical URL for the object.
I am trying to build a WPF C# application which requires shared data of a friend of my application user. I have tried using this query https://graph.facebook.com/[User_Id]/?fields=photos. But it do not return the array of object as mentioned in the Facebook Graph API. Although the query https://graph.facebook.com/me/?fields=photos does return pictures for the user.
I am able to retrieve the friend's cover photo by https://graph.facebook.com/[User_Id]/?fields=cover but not the photos, albums, events e.t.c . I can see that they are listed under Connection. Could anybody help ?
To access friends data, you have to ask for the appropriate permissions. Cover photos are public that's why you were able to fetch it.
Friend's Photos and Albums : friends_photos
Friend's Events: friends_events
Graph API call to receive friend's photos:
https://graph.facebook.com/User_ID/photos?access_token=your_access_token
As you're developing in C#, you might be interested in the native Facebook C# SDK.
[EDIT]
Fetching Friend's Photos and events through C# SDK:
var fb = new FacebookClient(Session["AccessToken"].ToString());
var parameters = new Dictionary<string, object>();
dynamic res = fb.Get("/User_ID?fields=photos,events");
var photoID = res.photos.data[0].id;