简体   繁体   English

与外部php网站的socialengine集成

[英]socialengine integration with external php website

I am using social-engine as Social-networking website and at same time we are having another website done in php CodeIngiter MVC. 我使用social-engine作为Social-networking网站,与此同时,我们在php CodeIngiter MVC中创建了另一个网站。 Now we want to integrate Social-engine with our website. 现在,我们想将Social-engine与我们的网站集成。 We are using Social-engine DB only for our php website. 我们仅对我们的php网站使用Social-engine DB。

When we log into our website it should be automatically logged into Social-engine also. 当我们登录我们的网站时,它也应该自动登录到社交引擎。 I don't know where to start from? 我不知道从哪里开始? Is there anyway to do it? 反正有做吗?

Probably you should create custom login action (default login action is in application/modules/User/controllers/AuthController.php) and launch it using AJAX, but this way is not too good because you might get unpredictable problems with session or something else. 可能您应该创建自定义登录操作(默认登录操作在application / modules / User / controllers / AuthController.php中),然后使用AJAX启动它,但是这种方式不太好,因为您可能会遇到会话或其他不可预测的问题。 Better way is to create login action which will be launched by user. 更好的方法是创建将由用户启动的登录操作。 User will click button (like facebook or twitter login buttons) and launch custom login action using data from your php website, where he is already logged in. 用户将单击按钮(例如facebook或twitter登录按钮),并使用您已经登录过的php网站中的数据启动自定义登录操作。

I will suggest you to create some API for the socialengine login and also in your php website. 我建议您为社交引擎登录以及在php网站中创建一些API。 That way , it shall help you. 这样,它将为您提供帮助。

For, our mobile native application for one client, We used that approach and its working fine. 对于一个客户端的移动本机应用程序,我们使用了这种方法及其良好的工作效果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM