Node-Webkit Facebook 集成 [英] Node-Webkit Facebook integration
问题描述
I am building a newsreader-ish desktop app using node-webkit
https://github.com/rogerwang/node-webkit
which is basically server and client at the same time. My Problem with the facebook API is the following: i want the user of my app to login and present them their current wall-postings and the stuff like this. In addition, i have a couple of news-items from other sources, which should be like-able/share-able from this user.
The whole app is a single-page JS (more exactly: coffeescript) thing with multiple components, a hard redirect is impossible.
Every login-possibility shown in the API seems not suited for my type of application. What is the best way to connect to facebook, without having a hard redirect and without an own URI to redirect to?
If you're developing a standalone client application, not a website, I wouldn't try to use their Javascript API, because it assumes it's being run on some website.
You might have more luck with the unofficial Node.js APIs, seeing as node-webkit allows you to make calls to any Node.js library from within the DOM.
If you still have no success, try letting the user log into Facebook itself, presenting its login page in an <iframe>
. Then you might be able to make HTTP calls, either through AJAX or through Node.js HTTP APIs, to call Facebook's internal APIs directly.
这篇关于Node-Webkit Facebook 集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!