Using access token from .net client library in JavaScript - google-api

I'm trying to upload videos to a YouTube channel using the JavaScript client library using the code samples.
However, my access and refresh tokens were gained using the .net library as I will need to use the elsewhere in .net code. I want to be able to instantiate the JavaScript library with those access tokens. The reason being that the JavaScript upload sequence is a lot nicer as you can have a progress bar etc.

Answer is to use gapi.auth.setToken

Related

Is there any way to call yammer Rest api in SharePoint framework?

I want a code sample which explains , how to call a yammer rest api url in sharepoint framework.
I am not aware of any support planned for the SharePoint framework at this time, but the Yammer JS SDK may be usable as an external JS library. Since it's just JavaScript, it's more likely a limitation of the tooling or framework if it won't run. You will have trouble calling the REST APIs without using the SDK. It currently lacks Typescript typings that you ideally would want to have. I'm not familiar enough with the SharePoint framework to know the best way to do this.

Advantages of using APIs wrapped with .NET in Xamarin

Around a year ago I made an iOS application that finds restaurants near your location of any type and displays information about them. I made a web service call using the FourSquare api to get all the data which was returned in json format and then I parsed it and displayed the information on the UI of the app. Now I want to make an android application using Xamarin.Android since I am learning working with Xamarin studios and C#. When I make a Xamarin.Android application and go to packages then add packages I see there is a Foursquare api package that has a .NET wrapper around it. Here is the website url:
https://www.nuget.org/packages/Foursquare.Api/
So my question is how does this work? Does adding this package mean I don't have to make a web serivce call anymore, instead all the data is stored inside this package and I just have to get all the data the same way I get information from a local database? What are the advantages of using this package instead of just making a web service call to Foursquare?
Think of it this way:
This Foursquare API is simply a .NET wrapper of the web service that you want to use. Thus, somebody has gone ahead and done all of the hard work for you so you can simply consume the returned data in your applications.
What does this mean for you?
Well it means that you don't have to write any REST consumption code and you can focus more on the actual application and any business logic that you need to implement based on the Foursquare objects.
To not confuse any further, this data would come the same way as if you wrote your own web service to access the data from the Foursquare API endpoint.
Advantages:
Already written for you
You don't need to know your way around their REST API
Usually follows best practices per language so it's easy to consume (Objects created, methods, etc)
Disadvantages:
REST endpoint might be updated and not reflect in the package until it's updated
Any bugs/issues in the framework can be hard to workaround if the project is not open source
Could be a lack of documentation on how to use the wrapper

Enable Audio only in tokbox api

i am using tokbox api integration for conference calls between two people.however ,sometimes based on user choice in my web application,i want to have only audio enabled in the tokbox session.
Is there a way to do so.
i am using api calls to generate a session id and javascript workaround to generate a token,unable to use sdk as GAE doesnt support it.
Inputs appreciated.
You can use JavaScript to disable publishing video, which results in audio only. The code is publisher.publishVideo(false). See the docs for Publisher for more information: https://tokbox.com/developer/sdks/js/reference/Publisher.html#publishVideo
Which language Server SDK is not working on GAE to generate tokens? It's a very bad idea to generate your tokens in JS on the client because your API Secret will be sent in the clear to anyone who visits your page.

Can Facebook's Graph API be used without using any SDK?

Can the full functionality of the Facebook Graph API be used with HTTP Requests, rather than using any of the SDK's? I've been able to use a GET requests to return public data; I've been able to use a POST request to make a post with an access token retrieved from Facebooks Graph API Explorer, but I'm not sure if Login, getting Access Tokens and determining whether a user has given permissions, is possible without using one of the SDK's? I could spend the next 2 days using trial and error, and reading docs to try to find out, but I'd hate to waste a couple days going down a road to nowhere if someone can just give me the answer now.
Yes, absolutely you can create application for Facebook without using any SDK..
SDK is just a software development kit (SDK or "devkit") it's typically a set of software development tools that allows for the creation of applications for a certain software package,
Facebook SDK made your work much easier because they give you ready made functions to call Facebook API
like PHP sdk ,C# sdk.. etc
If you want to create application without using it .. then you have to request Facebook Graph API directly ..
For e.g you need to get page information using JS SDK ..you need to pass only name/id of the page
in JS SDK
FB.api('/cocacola', function(response) {
console.log(response);
});
but if you want to go without SDK, then you need to call http://graph.facebook.com/cocacola
now you need to parse JSON then retrieve data based on the language you're working on

is it possible to use twitter Bootstrap->front-end + Spring-Hibernate->Backend in a web app that requires storage of session data

I want to create a web app that uses Twitter Bootstrap for the front end, and the backend uses Spring+Hibernate.
Now, some data has to be stored in each user's session-- how do I store/manage such data?
Do I have to use a 3rd party JS framework like Angular (by Google) or some other framework for this purpose?
Also, in such a hybrid app, should I use the JS framework (like Jquery or Angular JS) for storing the data and then send it to the Spring + Hibernate API? What I mean is, I can as well store the object-> relational DB mapping in the js framework, and use Spring only for basic database inserts/updates/selects?
Twitter bootstrap is a CSS framework with some javascript plugins, and is not a language in itself. Using it or not using it will have no impact on what you can/can't use on your backend.
As for sessions; sessions should always be stored server-side... therefore using Bootstrap will have no affect on your implementation of sessions.
Finally, in regards to keeping any of your database logic client side in javascript, NEVER do this. Javascript code can extremely easily be modified by the user, so anything client side should be considered unsecure. Do not ever put anything unsecure in your database.
We can use Twitter Bootstrap for the front end, and Spring MVC -> REST API for the back end...
For simple apps, ex search-only apps we can straightaway create an API and use JQuery to connect to the API and fetch data.
For more complex apps, the problem is that REST APIs dont store session data... For this, however we can use Spring MVC-> REST API as that has support specifically to handle sessions.
Refer http://tedyoung.me/2011/10/19/practical-spring-mvc-part-5-sessions/ that explains how to store session data using Spring MVC- and the front end is a simple HTML/CSS web page.

Resources