Node-Webkit Facebook integration

扶醉桌前 提交于 2019-12-06 04:14:32

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/15419985/node-webkit-facebook-integration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!