在 tomcat 中包含 facebook.php +莱夫雷
我想为我创建一个可以使用 facebook api 功能的网站。 我有一个 tomcat 网络服务器,上面安装了 liferay。
现在我需要实现 facebook.php 但我不知道把它放在哪里。 我在 php 中编写了一些代码来获取例如我的 id 或发布到我自己的个人资料中。但是liferay或tomcat无法从facebook.php加载东西,所以服务器不知道这些方法,也不能做我想让他做的事情。
谁能告诉我如何解决这个问题?
I want to make a site for me in which I can use the facebook api features.
I got a tomcat webserver ans liferay is installed on it.
Now I need to implement the facebook.php to this but I don't know where to put it.
I wrote some code in php to get for example my id or to post into my own profile. But liferay oder tomcat couldn't load the things from facebook.php so the server doesn't know the methods and can't do what I want him to do.
Can anybody tell me how to solve this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我以前从未真正这样做过,因为我试图让 PHP 代码远离 Liferay 并使用其他方法来访问第三个 API。然而,Tomcat wiki 有一篇文章:
Installing PHP on Tomcat
或者什么可能是更好的选择您使用 Facebook JavaScript API 并创建一个使用此 API 的新 Liferay portlet使用 PHP 的。
I've never actually done it before because I've tried to keep PHP code off Liferay and used other methods to access 3rd APIs. However the Tomcat wiki has a post on it:
Installing PHP on Tomcat
Or what maybe a better option is you use the Facebook JavaScript API and you create a new Liferay portlet which uses this API instead of using PHP.
如何在我的应用程序中使用 Facebook JAVA API? 将帮助您找到 facebook 的 java api。关于编程入门:这个问题远远超出了这里可以回答的范围。但基本上:尝试以您正在使用的语言访问 API。不要为了桥接到外部系统而桥接到不同的语言。
当您用 google 搜索 facebook java api 时,会出现更多的点击,以防该链接没有帮助。
How can I use Facebook JAVA API in my application? will help you find the java api for facebook. With regards to getting started with programming: That one is far beyond what can be answered here. But basically: Try to access the API in the language that you're working in. Don't bridge to a different language in order to bridge then to an external system.
There are a lot more hits when you google for facebook java api in case that link doesn't help.