red5 上的 facebook-java-api,它们可以一起工作吗?
我有一个 Adobe Flash Builder GUI 应用程序,可以连接到 Red5 进行通信。 我可以使用red5来调用facebook API吗?谁能举个例子吗?我能找到的所有例子都是用tomcat的。
谢谢!
I have a Adobe Flash Builder GUI application that connects to Red5 to communicate.
can i use the red5 to call facebook API calls? can anyone provide an example? all the examples that i can find are with tomcat.
thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不幸的是他们不能。
facebook-java-api 无法与 red5 一起使用,因为它需要不传递到 red5 的会话数据,并且使用我仅通过 java Servlet 接收的变量。
还有一个名为 TinyFbClient (www.socialjava.com) 的 facebook java api。
这个客户端很小,很容易理解,有很好的例子。
在这里我不必使用会话,但我确实需要获取我想要查询的用户的uid。客户端可以在需要时转发该信息。
TinyFbClient 依赖于 jersey (http://download.java.net/maven/ 2/com/sun/jersey/),但不幸的是 jersy 无法在 red5 上正确编译。如果您尝试使用二进制版本,您只会收到错误
,这是因为编译后的二进制文件无法正常运行。
我通过安装 tomcat 并允许用户首先连接到 tomcat 解决了这个问题,使用 tomcat 我获取会话和相关的 facebook 数据,将其存储在数据库中,然后使用 red5 根据需要操作数据。
希望这些信息会有所帮助。
更新
我收到了之前的错误消息,因为我没有将相关的jar(jersey和jsr311)复制到red5目录中。不幸的是它没有解决问题。
我尝试了不同版本的球衣(1.0.x、1.1.x、1.2)。代码确实可以编译,但任何对 facebook api 的调用都会停止应用程序。
我决定在tomcat中完成facebook信息获取部分,然后将其交付给red5。
Unfortunately they can't.
facebook-java-api cannot work with red5 because it requires the session data that does not pass into red5 and uses variables that i received only by a java Servlet.
there is also a facebook java api called TinyFbClient (www.socialjava.com).
this client is small, very easy to understand with very nice examples.
here i didn't have to use sessions, but i do need to get the uid of the user i want to query on. the client side can forward that information when needed.
TinyFbClient depends on jersey (http://download.java.net/maven/2/com/sun/jersey/) but unfortunately jersy does not compile on red5 properly. if you'll try to use the binary version you'll just get the error
and that is because the compiled binary cannot operate properly.
I resolved the issue by installing tomcat and allowing the user to connect to tomcat first, with tomcat i fetch the session and the relevant facebook data, stores it in a database and then with red5 i manipulate the data as needed.
hopefully this information will be found useful.
update
i had the previous error message because i did not copy the relevant jars (jersey and jsr311) to the red5 directory. unfortunately it did not solve the problem.
i tried different versions of jersey (1.0.x,1.1.x,1.2). the code did compile but any calls to a facebook api would just stop the application.
i decided to do the facebook information fetching part in tomcat and then to deliver it to red5.
是的,它可以在 Red5 中工作。特别是如果您让它在 Tomcat 中工作,因为我们提供了嵌入式 Tomcat 服务器。
Yes, it can work in Red5. Especially if you had it working in Tomcat, since we provide an embedded Tomcat server.