PHP Classes

I want to redirect to profile page after twitter or fb login..

Recommend this page to a friend!

      PHP OAuth Library  >  All threads  >  I want to redirect to profile page...  >  (Un) Subscribe thread alerts  
Subject:I want to redirect to profile page...
Summary:Hi I need to redirect to profile page from all login options...
Messages:3
Author:Shivaraj
Date:2012-12-24 12:07:38
Update:2012-12-26 06:44:53
 

  1. I want to redirect to profile page...   Reply   Report abuse  
Picture of Shivaraj Shivaraj - 2012-12-24 12:07:38
Hi I need to redirect to one profile page from all login options...
But I dont know how to give the url for redirect_uri or what code i need to add in profile page!. I cant able to redirect to profile page. The code redidects to same page.

I think i made u confusion.

Here my requirement,
/loin_fb.php => /profile.php
/login_twitter.php => /profile.php

for this pattern what code i need to add in to profile page?

Please help me...

I really Thankful to your OAuth API.
Regards,
Shivaraj

  2. Re: I want to redirect to profile page...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2012-12-26 02:08:00 - In reply to message 1 from Shivaraj
If you want to authenticate the user with either Facebook or Twitter with the same script, you can have for instance a script named login_with_oauth.php and append a parameter ?server={site} where {site} is replaced with Facebook or Twitter depending on what site the user has chosen to authenticate.

  3. Re: I want to redirect to profile page...   Reply   Report abuse  
Picture of Shivaraj Shivaraj - 2012-12-26 06:44:53 - In reply to message 2 from Manuel Lemos
Hi Manuel sir,

Thanks for your reply.

It worked for me your replay,
Now giving the following url so it is redirecting properly to profile page. Here the url:

MySite.com/profile/google
MySite.com/profile/facebook
MySite.com/profile/twitter

This url is for CodeIgniter. In profile view page:

if($server == 'google') {

include('login_with_google.php');

}elseif($server == 'facebook') {

include('login_with_facebook.php');

}
....etc.

Regards,
ShivarajRH
about.me/shivarajrh