Has anyone tried to integrate DISQUS into a Windows 8 store app? Or do we need to build around the DISQUS API?
We have an existing blog site that uses DISQUS and I'm currently building a Win8 app in XAML+C# that displays the same blog items (and have the comments functionality as well).
We haven't released this officially yet, but there's a public API wrapper that is compatible with Windows Store apps here: https://github.com/ryanvalentin/DisqusApiPortable
In general, there are a few things to think about when creating a commenting experience:
Authentication with the API - you need to have a server to receive the callback/request the access token. More information on that here: http://disqus.com/api/docs/auth/
Listing comments. The main limitation here is that there's no public API endpoint for showing threaded comments like you see in the embedded product. You would have to show a flat list of comments instead, sorted either oldest or newest.
Posting comments. This requires some care to make the experience pleasurable, including proper communication when a user encounters errors.
Additionally you can add comment voting, thread favoriting and almost anything else using the public API. This documentation covers general API usage that the wrapper enables: http://help.disqus.com/customer/portal/articles/1104798
Lastly, you might consider using a web view control to load the standard Disqus javascript embed. For that I'd follow these instructions: http://help.disqus.com/customer/portal/articles/472096
Related
I want to develop a basic C# application that makes use of Microsoft Graph API to retrieve all user emails and contacts.
How would I approach this to implement it from scratch on Visual Studio?
I tried to add a method to do so in the provided sample, without success.
You can start with some of the QuickStarts
https://developer.microsoft.com/en-us/graph/quick-start
For example, you start with ASP.NET MVC quickstart and then expand it with additional controllers that would handle listing emails and contacts.
There is quite good SDK for .NET that you can use in your apps - it will make your development easier. The SDK enables you to write quite nice async calls instead of calling the API directly and composing your REST queries.
For example, to retrieve messages in user's mailbox you would make a call like
graphServiceClient.Me.Messages.Request().GetAsync();
It might be helpful to take some ideas from my demo app that I use for conferences - it is based on some Graph Labs
https://github.com/panjkov/Office365PlannerTask
Take a look at Groups and Tasks controllers, as well as corresponding data repository classes - there are methods to retrieve particular collections, as well to retrieve specific items.
In short, i am looking for the best mehod to provide a REST or SOAP API Server in a .Net Framework application (e.g. windows forms) - without admin rights in some cases
What is currently the best way of providing a web based REST or SOAP API in a possible portable csharp application?
Basically i need something that supports the basic http standards out of the box (e.g. Expect: 100-continue and others) and at the same time is able to instanciate the classes of my csharp program directly (perfomrance and ease of use reasons).
The microsoft way is to either use IIS and possibly ASP or go for httplistener. IIS could never be run in a portable way and requires lots of installation procedure/system administration based work. httlistener on the other hand is not even close to being a webserver, i would need to implement all the standard webserver commands on my own.
I am looking around for this topic since years now, one example is this question [old question] Alternative to HttpListener?
Unfortunately this one links to a discontinued project.
Any ideas?
[EDIT] The question targets not only C# but also .NET Framework 2-4.5. The result should be useable in e.g. Windows Form, Windows Service and Commandline applications.
Currently i am using a skeleton Webserver based on HTTPListener and therefore i need to implement all the Parsing of a request, formatting of answers and reacting to special http commands on my own (which seems to be a never ending task): https://www.codeproject.com/Articles/17071/Sample-HTTP-Server-Skeleton-in-C
You could try Griffin web server. I've used it for embedding a web server into applications to host a simple web interface, file hosting, and to provide a REST API for my application.
The biggest advantage for me versus the embedio project (which is excellent) is that it doesn't require admin privileges to run. Looks like no SOAP integration out of the box though.
You should be able to do what you want using .NET Core. You can fairly easily build a self-hosted API using it that's independent of IIS. Tutorials should be easy to find, and here is a Microsoft example.
As ilikesleeping suggested you could use dotnet core, but there are complications in making it work as a service.
I suggest you to use Microsoft OWIN framework. It's really simple and straightforward way of building restful applications. It can work fine as Console or a service, and of course in Console mkode you can display a Form should you wish to.
Here are some links to get kickstarted:
https://learn.microsoft.com/en-us/aspnet/web-api/overview/hosting-aspnet-web-api/use-owin-to-self-host-web-api | https://learn.microsoft.com/en-us/aspnet/aspnet/overview/owin-and-katana/getting-started-with-owin-and-katana | https://blog.decayingcode.com/post/Creating-a-Self-Hosted-OWIN-Application/ |
https://weblogs.asp.net/fredriknormen/creating-a-simple-rest-like-service-with-owin-open-web-server-interface
EDIT:
...and here's the topic on how to have a middleware that hosts SOAP endpoint over OWIN: Any way to get OWIN to host a SOAP service?
I am the author of this question. Just wanted to make obvious for future readers what i learned here:
Most interesting about this question is that it is a "shopping" question. The accepted answer cannot be based on facts but on subjective feeling only. Most of the suggested methods hit the described usecase.
This is the reason why some users did not want to write an answer but instead put their suggestions in a comment instead. Strange but this is how SO works. We just prefer scientifically correct answers here!
By te way, this was my first "bounty" question. I am active SO user since about 3 weeks. (passive for years, like most people)
I'm working on an application that requires me to host a WCF REST Web App using Windows Service. Now since it is going to be a bit more complicated than just a small API, I would like leverage MVC capabilities as a lot of things would be lot easier if done using the 'Controller' way (if I can say so). I'm don't have deep knowledge of MVC and Windows Service.
So far, I've found only two links here & here, that are somewhat related to what I want, but still not there. Could anyone please point me to a working example or create a small demo? TIA.
Based on your comments, it is clear that you are wanting to run REST-based web-services, self-hosted, on both Linux and Windows.
The recommended way to do this is to use the new ASP.NET Core platform, running on .NET Core.
Microsoft provide a good tutorial here:
https://docs.asp.net/en/latest/tutorials/first-web-api.html
Another link just received from a quick google search Here but yes need some more clarity on how you plan to run it or what its for.
We used Nugent package manager years ago for self-hosting a web API
I found one .net wrapper for google maps api v3 here.
But in that link it has not mentioned weather it supports API V3 or not.
Also can some one point me towards using this dll in asp.net mvc 2 application?
Not sure how useful this answer is but here I go.
I wouldnt choose any wrapper out there without doing some research about the same. From the url that you shared looks like there is only 1 contributor to the project, also the dwnld count on the latest api is 117 which I dont think is a great number to warrant its use, there have only been 3 issues reported so far and from the looks of it they are inquiries or feature requests (not sure if it means that there are no bugs in the project or it hasn't been used).
Anyways having said that there are commercial wrappers out there which support google maps. I can think of ThinkGeo for one. see if that is within your budget.
Now to your dll question. Just adding a reference in your web project should do the trick and then probably creating a seprate controller that serves your map. Is that what you wanted?
.NET wrapper libraries for the Google Maps API :
GoogleApi
google-maps
https://stackoverflow.com/a/61531795
Your sdk rocks. I have built several apps using the sdk quickly, so thank you for that.
I have searched this topic, but could not find a direct answer.
I will try to explain it as clear as I can.
Like many other developers, I am hosting on our server more than one app.
I have managed to make apps work both from web.config and by passing IFacebookApplication to FacebookContext.SetApplication().
As it was mentioned on other posts, setting the configuration programmatically via FacebookContext.SetApplication() seems to be the only choice for me now.
The BIG questions:
Is this method setting the
IFacebookApplication for the entire asp.net application? I mean,
is this change global? Or is it just
for the current FacebookClient?
if I have a high user concurrency on
different fb-apps(on the same
asp.net application), will calling
FacebookContext.SetApplication() *simultaneously* from each fb-app make errors/collisions?
Is it "concurrency safe"?
I will appreciate concrete and direct answers.
Thank you for your great work!
Cheers,
-Itye