socialengine integration with external php website - php

I am using social-engine as Social-networking website and at same time we are having another website done in php CodeIngiter MVC. Now we want to integrate Social-engine with our website. We are using Social-engine DB only for our php website.
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.
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.

I will suggest you to create some API for the socialengine login and also in your php website. That way , it shall help you.
For, our mobile native application for one client, We used that approach and its working fine.

Related

Prevent user from like/ share/ add comment to content if he is not directly logged into my website

I am trying to integrate facebook login, like, share, comments in my website.
I successfully done this job "individually" which is obviously easy when the fb documentation is followed.
Now the interesting bit is I was asked to integrate these in such a way that
The user should be able to like/ comment/ share if and only if he is logged into my website with his facebook credentials. Or else a popup should appear asking the user to login before he can do those actions (like/ comment/ share)
The user should not be automatically logged into website even if he has opened facebook in another tab (which I tried to achieve but the user is able to like/ share/ comment even without actually logging into my website which I should prevent).
Please throw some light on how to complete this task. I am using PHP and jQuery.
Thanks for any suggestions.
I haven't ever done anything like this but I assume there is some or other 'widget' on your page that performs the tasks you mention. I also assume that these widgets are provided by, say, facebook.
I would suggest simply not rendering the relevant widget unless your user is signed into your site.
You could render some 'disabled' image that looks like the original that can pop up your login page.

PHP Openid selector try_auth file

I am trying to implement openid selector into my website, I wonder what is the try_auth file that I need for my openid selector to work?
All I want user to login into my website is using only their google account, so could anyone help me out? I have been doing alot of research and I didn't find a successful way of doing so. I am using PHP for my back end development.
Perhaps if someone could help explain how everything works that will be great, as well I didn't plan to use DB to store any user login. I know I have to have a session variable to check in every page whether user have login or not.
openid-selector is just a nice front-end for choosing which OpenID provider to use for signing in.
You also need a library that does the according back-end stuff. In your case this missing file is part of php-openid: https://github.com/openid/php-openid

Facebook php login status

I'm trying to do something similar to the login/registration flow described on this page but via php only.
http://developers.facebook.com/docs/plugins/registration/
What I want to do is display a register link if a user is logged in to facebook but not registered with my site, and a login link if they're not logged in to facebook, however I want to do this all on my side in php, and not using the fb:login-button widget. Is this possible?
I have the login url working, i just want to change the name of the button based on the users status.
You can't do it without loading the javascript lib. If you load nothing from Facebook on the client, then there is no way to do cross domain communication (security). Which means there is no way to tell who the user is, much less if they are logged into Facebook. By loading the javascript API on the client, the javascript code can check for a Facebook cookie and determine who they are and whether they are logged into Facebook or not.
Check through javascript and do a page reload if need be. Better yet, just use css to show/hide what you want.
http://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus/
Yes, it is possible. Here's a tutorial:
Tutorial,
Example tutorial

Log out of BOTH Wordpress & Facebook

So I've successfully integrated Facebook into my Wordpress site. I've also linked together the accounts. However, the way the site works is that you're either logged into the site via the
Wordpress Account
Facebook Account or
Wordpress & Facebook
I know how to log out of Facebook and I know how to log out of Wordpress, but the two methods are using Javascript and PHP respectively.
How would I, with one logout link, use both the PHP and Javascript logout methods?
I solved this issue by using FB.Connect.logoutAndRedirect()
Sign out
and in fb_logout.php I used: session_destroy(); like:
<?php
session_destroy();
header('Location: http://yoursite.com');
Which seems to work pretty well.
I would use Ajax. You can call the javascript function and a php script.
If you have no idea how ajax works a really easy way to do is using jQuery.post.

Joomla unified logins for forum and a custom made php sub-site

I'm building a site with Joomla where a forum should exist amongst other things. But also I plan to develop a custom made functionality (diary-like) with a php inserts (it really works, for example with jumi). The problem is that I suppose nobody will understand if the forum and this sub-site will have separated logins. I'd use an existing forum authentication for my code also, but I don't like the idea that the login will look like forum-only login. I see there are bridges exist (like JFusion), but should I choose one particular forum extension if I plan to use a particular bridge extension? And are bridges easy to access with custom-made php code?
If this is for a Joomla 1.5 website, you will want to create a user plugin that will log the user into your custom site as they log into Joomla. Take a look at plugins/user/example.php for an example user plugin. The onLoginUser function will be called just after someone successfully logs into Joomla. At this point, you'll have all of their data in the $user array that's passed into the function. You should be able to use this information to create a bridge into your external PHP application.

Categories